question string | answer string | context string | dialect string | spider_hardness string | extended_hardness string | classification_status string | syntax_status string | ddl_syntax_status string | schema_status string | syntax_errors list | ddl_syntax_errors list | schema_errors list | classification_errors list | status_history list | correction_status string | component1 int64 | component2 int64 | others int64 | validation_source dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Show all document names using templates with template type code BK. | SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T1.template_type_code = 'BK' | CREATE TABLE Documents (document_name VARCHAR(255), template_id VARCHAR(255)); CREATE TABLE Templates (template_id VARCHAR(255), template_type_code VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 4138
} |
Show all template type codes and the number of documents using each type. | SELECT T1.template_type_code, COUNT(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code | CREATE TABLE Documents (template_id VARCHAR(255), document_name VARCHAR(255)); CREATE TABLE Templates (template_type_code VARCHAR(255), template_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 4139
} |
Which template type code is used by most number of documents? | SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE Documents (template_id VARCHAR(255), document_name VARCHAR(255)); CREATE TABLE Templates (template_type_code VARCHAR(255), template_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 0 | {
"split": "train",
"row_index": 4140
} |
Show all template type codes and descriptions. | SELECT template_type_code, template_type_description FROM Ref_template_types | CREATE TABLE Ref_template_types (template_type_code VARCHAR(255), template_type_description VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 1 | {
"split": "train",
"row_index": 4142
} |
What is the template type descriptions for template type code "AD". | SELECT template_type_description FROM Ref_template_types WHERE template_type_code = 'AD' | CREATE TABLE Ref_template_types (template_type_description VARCHAR(255), template_type_code VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 4143
} |
What is the template type code for template type description "Book". | SELECT template_type_code FROM Ref_template_types WHERE template_type_description = 'Book' | CREATE TABLE Ref_template_types (template_type_code VARCHAR(255), template_type_description VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 4144
} |
What are the distinct template type descriptions for the templates ever used by any document? | SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID = T3.template_ID | CREATE TABLE Templates (template_type_code VARCHAR(255), Template_ID VARCHAR(255)); CREATE TABLE Documents (template_ID VARCHAR(255), document_name VARCHAR(255)); CREATE TABLE Ref_template_types (template_type_description VARCHAR(255), template_type_code VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 4145
} |
What are the template ids with template type description "Presentation". | SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code WHERE T1.template_type_description = 'Presentation' | CREATE TABLE Templates (template_id VARCHAR(255), template_type_code VARCHAR(255)); CREATE TABLE Ref_template_types (template_type_code VARCHAR(255), template_type_description VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 4146
} |
How many paragraphs in total? | SELECT COUNT(*) FROM Paragraphs | CREATE TABLE Paragraphs (Id VARCHAR(255), document_ID VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 4147
} |
How many paragraphs for the document with name 'Summer Show'? | SELECT COUNT(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show' | CREATE TABLE Documents (document_ID VARCHAR(255), document_name VARCHAR(255)); CREATE TABLE Paragraphs (document_ID VARCHAR(255), paragraph_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 4148
} |
Show paragraph details for paragraph with text 'Korea ' . | SELECT other_details FROM paragraphs WHERE paragraph_text LIKE 'korea' | CREATE TABLE paragraphs (other_details VARCHAR(255), paragraph_text VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 4149
} |
Show all paragraph ids and texts for the document with name 'Welcome to NY'. | SELECT T1.paragraph_id, T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.Document_Name = 'Welcome to NY' | CREATE TABLE Documents (document_id VARCHAR(255), Document_Name VARCHAR(255)); CREATE TABLE Paragraphs (paragraph_id VARCHAR(255), paragraph_text VARCHAR(255), document_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 4150
} |
Show all paragraph texts for the document "Customer reviews". | SELECT T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = 'Customer reviews' | CREATE TABLE Paragraphs (paragraph_text VARCHAR(255), document_id VARCHAR(255)); CREATE TABLE Documents (document_id VARCHAR(255), document_name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 4151
} |
Show all document ids and the number of paragraphs in each document. Order by document id. | SELECT document_id, COUNT(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id | CREATE TABLE Paragraphs (document_id VARCHAR(255), paragraph_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 4152
} |
Show all document ids, names and the number of paragraphs in each document. | SELECT T1.document_id, T2.document_name, COUNT(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id | CREATE TABLE Documents (document_name VARCHAR(255), document_id VARCHAR(255)); CREATE TABLE Paragraphs (document_id VARCHAR(255), paragraph_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 4153
} |
List all document ids with at least two paragraphs. | SELECT document_id FROM Paragraphs GROUP BY document_id HAVING COUNT(*) >= 2 | CREATE TABLE Paragraphs (document_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 4154
} |
What is the document id and name with greatest number of paragraphs? | SELECT T1.document_id, T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE Documents (document_name VARCHAR(255), document_id VARCHAR(255)); CREATE TABLE Paragraphs (document_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 1 | {
"split": "train",
"row_index": 4155
} |
What is the document id with least number of paragraphs? | SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY COUNT(*) LIMIT 1 | CREATE TABLE Paragraphs (document_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 4156
} |
What is the document id with 1 to 2 paragraphs? | SELECT document_id FROM Paragraphs GROUP BY document_id HAVING COUNT(*) BETWEEN 1 AND 2 | CREATE TABLE Paragraphs (document_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 4157
} |
Show the document id with paragraph text 'Brazil' and 'Ireland'. | SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland' | CREATE TABLE Paragraphs (document_id VARCHAR(255), paragraph_text VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 4158
} |
How many teachers are there? | SELECT COUNT(*) FROM teacher | CREATE TABLE teacher (Id VARCHAR(255), Name VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 4159
} |
List the names of teachers in ascending order of age. | SELECT Name FROM teacher ORDER BY Age | CREATE TABLE teacher (Name VARCHAR(255), Age VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 4160
} |
What are the age and hometown of teachers? | SELECT Age, Hometown FROM teacher | CREATE TABLE teacher (Age VARCHAR(255), Hometown VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 1 | {
"split": "train",
"row_index": 4161
} |
List the name of teachers whose hometown is not `` Little Lever Urban District '' . | SELECT name FROM teacher WHERE hometown <> 'little lever urban district' | CREATE TABLE teacher (name VARCHAR(255), hometown VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 4162
} |
Show the name of teachers aged either 32 or 33? | SELECT Name FROM teacher WHERE Age = 32 OR Age = 33 | CREATE TABLE teacher (Name VARCHAR(255), Age VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 4163
} |
What is the hometown of the youngest teacher? | SELECT Hometown FROM teacher ORDER BY Age LIMIT 1 | CREATE TABLE teacher (Hometown VARCHAR(255), Age VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 4164
} |
Show different hometown of teachers and the number of teachers from each hometown. | SELECT Hometown, COUNT(*) FROM teacher GROUP BY Hometown | CREATE TABLE teacher (Hometown VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 4165
} |
List the most common hometown of teachers. | SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE teacher (Hometown VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 4166
} |
Show the hometowns shared by at least two teachers. | SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*) >= 2 | CREATE TABLE teacher (Hometown VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 4167
} |
Show names of teachers and the courses they are arranged to teach. | SELECT T3.Name, T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID | CREATE TABLE course_arrange (Course_ID VARCHAR(255), Teacher_ID VARCHAR(255)); CREATE TABLE teacher (Name VARCHAR(255), Teacher_ID VARCHAR(255)); CREATE TABLE course (Course VARCHAR(255), Course_ID VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 4168
} |
Show names of teachers and the courses they are arranged to teach in ascending alphabetical order of the teacher's name. | SELECT T3.Name, T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name | CREATE TABLE course_arrange (Course_ID VARCHAR(255), Teacher_ID VARCHAR(255)); CREATE TABLE teacher (Name VARCHAR(255), Teacher_ID VARCHAR(255)); CREATE TABLE course (Course VARCHAR(255), Course_ID VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 4169
} |
Show the name of the teacher for the math course. | SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = 'Math' | CREATE TABLE course_arrange (Course_ID VARCHAR(255), Teacher_ID VARCHAR(255)); CREATE TABLE course (Course_ID VARCHAR(255), Course VARCHAR(255)); CREATE TABLE teacher (Name VARCHAR(255), Teacher_ID VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 4170
} |
Show names of teachers and the number of courses they teach. | SELECT T2.Name, COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name | CREATE TABLE teacher (Name VARCHAR(255), Teacher_ID VARCHAR(255)); CREATE TABLE course_arrange (Teacher_ID VARCHAR(255), Course_ID VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 4171
} |
Show names of teachers that teach at least two courses. | SELECT T2.Name FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name HAVING COUNT(*) >= 2 | CREATE TABLE teacher (Name VARCHAR(255), Teacher_ID VARCHAR(255)); CREATE TABLE course_arrange (Teacher_ID VARCHAR(255), Course_ID VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 4172
} |
List the names of teachers who have not been arranged to teach courses. | SELECT Name FROM teacher WHERE NOT Teacher_id IN (SELECT Teacher_id FROM course_arrange) | CREATE TABLE course_arrange (Name VARCHAR(255), Teacher_id VARCHAR(255)); CREATE TABLE teacher (Name VARCHAR(255), Teacher_id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 4173
} |
How many visitors below age 30 are there? | SELECT COUNT(*) FROM visitor WHERE age < 30 | CREATE TABLE visitor (age INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 4174
} |
Find the names of the visitors whose membership level is higher than 4, and order the results by the level from high to low. | SELECT name FROM visitor WHERE Level_of_membership > 4 ORDER BY Level_of_membership DESC | CREATE TABLE visitor (name VARCHAR(255), Level_of_membership INTEGER) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 4175
} |
What is the average age of the visitors whose membership level is not higher than 4? | SELECT AVG(age) FROM visitor WHERE Level_of_membership <= 4 | CREATE TABLE visitor (age INTEGER, Level_of_membership VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 4176
} |
Find the name and membership level of the visitors whose membership level is higher than 4, and sort by their age from old to young. | SELECT name, Level_of_membership FROM visitor WHERE Level_of_membership > 4 ORDER BY age DESC | CREATE TABLE visitor (name VARCHAR(255), Level_of_membership INTEGER, age VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 4177
} |
Find the id and name of the museum that has the most staff members? | SELECT museum_id, name FROM museum ORDER BY num_of_staff DESC LIMIT 1 | CREATE TABLE museum (museum_id VARCHAR(255), name VARCHAR(255), num_of_staff VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 4178
} |
What are the opening year and staff number of the museum named Plaza Museum? | SELECT Num_of_Staff, Open_Year FROM museum WHERE name = 'Plaza Museum' | CREATE TABLE museum (Num_of_Staff VARCHAR(255), Open_Year VARCHAR(255), name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 4180
} |
find the names of museums which have more staff than the minimum staff number of all museums opened after 2010. | SELECT name FROM museum WHERE num_of_staff > (SELECT MIN(num_of_staff) FROM museum WHERE open_year > 2010) | CREATE TABLE museum (name VARCHAR(255), num_of_staff INTEGER, open_year INTEGER) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 4181
} |
find the id, name and age for visitors who visited some museums more than once. | SELECT t1.id, t1.name, t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t1.id HAVING COUNT(*) > 1 | CREATE TABLE visit (visitor_id VARCHAR(255), visit_date VARCHAR(255)); CREATE TABLE visitor (id VARCHAR(255), name VARCHAR(255), age VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 4182
} |
What are the id, name and membership level of visitors who have spent the largest amount of money in total in all museum tickets? | SELECT t2.visitor_id, t1.name, t1.Level_of_membership FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t2.visitor_id ORDER BY SUM(t2.Total_spent) DESC LIMIT 1 | CREATE TABLE visit (visitor_id VARCHAR(255), Total_spent INTEGER); CREATE TABLE visitor (name VARCHAR(255), Level_of_membership VARCHAR(255), id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 1 | {
"split": "train",
"row_index": 4183
} |
What are the id and name of the museum visited most times? | SELECT t2.Museum_ID, t1.name FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID GROUP BY t2.Museum_ID ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE museum (name VARCHAR(255), Museum_ID VARCHAR(255)); CREATE TABLE visit (Museum_ID VARCHAR(255), visit_date VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 1 | {
"split": "train",
"row_index": 4184
} |
Find the name and age of the visitor who bought the most tickets at once. | SELECT t1.name, t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id ORDER BY t2.num_of_ticket DESC LIMIT 1 | CREATE TABLE visitor (name VARCHAR(255), age VARCHAR(255), id VARCHAR(255)); CREATE TABLE visit (visitor_id VARCHAR(255), num_of_ticket VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 4186
} |
What are the average and maximum number of tickets bought in all visits? | SELECT AVG(num_of_ticket), MAX(num_of_ticket) FROM visit | CREATE TABLE visit (num_of_ticket INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 2 | {
"split": "train",
"row_index": 4187
} |
What is the total ticket expense of the visitors whose membership level is 1? | SELECT SUM(t2.Total_spent) FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id WHERE t1.Level_of_membership = 1 | CREATE TABLE visit (Total_spent INTEGER, visitor_id VARCHAR(255)); CREATE TABLE visitor (id VARCHAR(255), Level_of_membership VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 4188
} |
What is the name of the visitor who visited both a museum opened before 2009 and a museum opened after 2011? | SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year < 2009 INTERSECT SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year > 2011 | CREATE TABLE visitor (name VARCHAR(255), id VARCHAR(255)); CREATE TABLE museum (Museum_ID VARCHAR(255), open_year INTEGER); CREATE TABLE visit (visitor_id VARCHAR(255), Museum_ID VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 1 | 0 | {
"split": "train",
"row_index": 4189
} |
Find the number of visitors who did not visit any museum opened after 2010. | SELECT COUNT(*) FROM visitor WHERE NOT id IN (SELECT t2.visitor_id FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID WHERE t1.open_year > 2010) | CREATE TABLE museum (Museum_ID VARCHAR(255), open_year INTEGER); CREATE TABLE visitor (id VARCHAR(255), name VARCHAR(255)); CREATE TABLE visit (visitor_id VARCHAR(255), Museum_ID VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 1 | {
"split": "train",
"row_index": 4190
} |
How many museums were opened after 2013 or before 2008? | SELECT COUNT(*) FROM museum WHERE open_year > 2013 OR open_year < 2008 | CREATE TABLE museum (open_year VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 4191
} |
Find the total number of players. | SELECT COUNT(*) FROM players | CREATE TABLE players (Id VARCHAR(255), name VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 4192
} |
Find the total number of matches. | SELECT COUNT(*) FROM matches | CREATE TABLE matches (Id VARCHAR(255), name VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 4193
} |
List the first name and birth date of all players from the country with code USA. | SELECT first_name, birth_date FROM players WHERE country_code = 'USA' | CREATE TABLE players (first_name VARCHAR(255), birth_date VARCHAR(255), country_code VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 4194
} |
find the number of distinct country codes of all players. | SELECT COUNT(DISTINCT country_code) FROM players | CREATE TABLE players (country_code VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 4198
} |
Find the number of distinct name of losers. | SELECT COUNT(DISTINCT loser_name) FROM matches | CREATE TABLE matches (loser_name VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 4199
} |
Find the name of tourney that has more than 10 matches. | SELECT tourney_name FROM matches GROUP BY tourney_name HAVING COUNT(*) > 10 | CREATE TABLE matches (tourney_name VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 4200
} |
List the names of all winners who played in both 2013 and 2016. | SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016 | CREATE TABLE matches (winner_name VARCHAR(255), YEAR VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 4201
} |
List the number of all matches who played in years of 2013 or 2016. | SELECT COUNT(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016 | CREATE TABLE matches (YEAR VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 4202
} |
What are the country code and first name of the players who won in both tourney WTA Championships and Australian Open? | SELECT T1.country_code, T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships' INTERSECT SELECT T1.country_code, T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'Australian Open' | CREATE TABLE matches (winner_id VARCHAR(255), tourney_name VARCHAR(255)); CREATE TABLE players (country_code VARCHAR(255), first_name VARCHAR(255), player_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 1 | 1 | {
"split": "train",
"row_index": 4203
} |
Find the first name and country code of the oldest player. | SELECT first_name, country_code FROM players ORDER BY birth_date LIMIT 1 | CREATE TABLE players (first_name VARCHAR(255), country_code VARCHAR(255), birth_date VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 4204
} |
List the first and last name of all players in the order of birth date. | SELECT first_name, last_name FROM players ORDER BY birth_date | CREATE TABLE players (first_name VARCHAR(255), last_name VARCHAR(255), birth_date VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 4205
} |
List the first and last name of all players who are left / L hand in the order of birth date. | SELECT first_name, last_name FROM players WHERE hand = 'L' ORDER BY birth_date | CREATE TABLE players (first_name VARCHAR(255), last_name VARCHAR(255), hand VARCHAR(255), birth_date VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 4206
} |
Find the first name and country code of the player who did the most number of tours. | SELECT T1.country_code, T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours DESC LIMIT 1 | CREATE TABLE players (country_code VARCHAR(255), first_name VARCHAR(255), player_id VARCHAR(255)); CREATE TABLE rankings (player_id VARCHAR(255), tours VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 4207
} |
Find the year that has the most number of matches. | SELECT YEAR FROM matches GROUP BY YEAR ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE matches (YEAR VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 4208
} |
Find the name and rank points of the winner who won the most times. | SELECT winner_name, winner_rank_points FROM matches GROUP BY winner_name ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE matches (winner_name VARCHAR(255), winner_rank_points VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 4209
} |
Find the name of the winner who has the highest rank points and participated in the Australian Open tourney. | SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1 | CREATE TABLE matches (winner_name VARCHAR(255), tourney_name VARCHAR(255), winner_rank_points VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 4210
} |
find the names of loser and winner who played in the match with greatest number of minutes. | SELECT winner_name, loser_name FROM matches ORDER BY minutes DESC LIMIT 1 | CREATE TABLE matches (winner_name VARCHAR(255), loser_name VARCHAR(255), minutes VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 4211
} |
find the number of players for each country. | SELECT COUNT(*), country_code FROM players GROUP BY country_code | CREATE TABLE players (country_code VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 4214
} |
find the code of the country where has the greatest number of players. | SELECT country_code FROM players GROUP BY country_code ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE players (country_code VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 4215
} |
Find the codes of countries that have more than 50 players. | SELECT country_code FROM players GROUP BY country_code HAVING COUNT(*) > 50 | CREATE TABLE players (country_code VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 4216
} |
Find the total number of tours for each ranking date. | SELECT SUM(tours), ranking_date FROM rankings GROUP BY ranking_date | CREATE TABLE rankings (ranking_date VARCHAR(255), tours INTEGER) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 4217
} |
Find the number of matches happened in each year. | SELECT COUNT(*), YEAR FROM matches GROUP BY YEAR | CREATE TABLE matches (YEAR VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 4218
} |
Find the name and rank of the 3 youngest winners across all matches. | SELECT DISTINCT winner_name, winner_rank FROM matches ORDER BY winner_age LIMIT 3 | CREATE TABLE matches (winner_name VARCHAR(255), winner_rank VARCHAR(255), winner_age VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 4219
} |
How many different winners both participated in the WTA Championships and were left handed? | SELECT COUNT(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L' | CREATE TABLE matches (winner_name VARCHAR(255), tourney_name VARCHAR(255), winner_hand VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 4220
} |
Find the first name, country code and birth date of the winner who has the highest rank points in all matches. | SELECT T1.first_name, T1.country_code, T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1 | CREATE TABLE players (first_name VARCHAR(255), country_code VARCHAR(255), birth_date VARCHAR(255), player_id VARCHAR(255)); CREATE TABLE matches (winner_id VARCHAR(255), winner_rank_points VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 4221
} |
Find the number of players for each hand type. | SELECT COUNT(*), hand FROM players GROUP BY hand | CREATE TABLE players (hand VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 4222
} |
How many ships ended up being 'Captured'? | SELECT COUNT(*) FROM ship WHERE disposition_of_ship = 'Captured' | CREATE TABLE ship (disposition_of_ship VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 4223
} |
List the name and tonnage ordered by in descending alphaetical order for the names. | SELECT name, tonnage FROM ship ORDER BY name DESC | CREATE TABLE ship (name VARCHAR(255), tonnage VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 4224
} |
List the name, date and result of each battle. | SELECT name, date FROM battle | CREATE TABLE battle (name VARCHAR(255), date VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 1 | {
"split": "train",
"row_index": 4225
} |
What is maximum and minimum death toll caused each time? | SELECT MAX(killed), MIN(killed) FROM death | CREATE TABLE death (killed INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 2 | {
"split": "train",
"row_index": 4226
} |
What is the average number of injuries caused each time? | SELECT AVG(injured) FROM death | CREATE TABLE death (injured INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 4227
} |
What are the name and results of the battles when the bulgarian commander is not 'Boril' | SELECT name, RESULT FROM battle WHERE bulgarian_commander <> 'Boril' | CREATE TABLE battle (name VARCHAR(255), RESULT VARCHAR(255), bulgarian_commander VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 4229
} |
What are the different ids and names of the battles that lost any 'Brig' type shipes? | SELECT DISTINCT T1.id, T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.ship_type = 'Brig' | CREATE TABLE ship (lost_in_battle VARCHAR(255), ship_type VARCHAR(255)); CREATE TABLE battle (id VARCHAR(255), name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 4230
} |
What are the ids and names of the battles that led to more than 10 people killed in total. | SELECT T1.id, T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle JOIN death AS T3 ON T2.id = T3.caused_by_ship_id GROUP BY T1.id HAVING SUM(T3.killed) > 10 | CREATE TABLE death (caused_by_ship_id VARCHAR(255), killed INTEGER); CREATE TABLE battle (id VARCHAR(255), name VARCHAR(255)); CREATE TABLE ship (lost_in_battle VARCHAR(255), id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 4231
} |
What are the distinct battle names which are between bulgarian commander 'Kaloyan' and latin commander 'Baldwin I'? | SELECT name FROM battle WHERE bulgarian_commander = 'Kaloyan' AND latin_commander = 'Baldwin I' | CREATE TABLE battle (name VARCHAR(255), bulgarian_commander VARCHAR(255), latin_commander VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 4233
} |
How many different results are there for the battles? | SELECT COUNT(DISTINCT RESULT) FROM battle | CREATE TABLE battle (RESULT VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 4234
} |
How many battles did not lose any ship with tonnage '225'? | SELECT COUNT(*) FROM battle WHERE NOT id IN (SELECT lost_in_battle FROM ship WHERE tonnage = '225') | CREATE TABLE ship (id VARCHAR(255), lost_in_battle VARCHAR(255), tonnage VARCHAR(255)); CREATE TABLE battle (id VARCHAR(255), lost_in_battle VARCHAR(255), tonnage VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 1 | {
"split": "train",
"row_index": 4235
} |
List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta' | SELECT T1.name, T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'Lettice' INTERSECT SELECT T1.name, T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'HMS Atalanta' | CREATE TABLE ship (lost_in_battle VARCHAR(255), name VARCHAR(255)); CREATE TABLE battle (name VARCHAR(255), date VARCHAR(255), id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 1 | 1 | {
"split": "train",
"row_index": 4236
} |
What are the notes of the death events which has substring 'East'? | SELECT note FROM death WHERE note LIKE '%East%' | CREATE TABLE death (note VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 4238
} |
what are all the addresses including line 1 and line 2? | SELECT line_1, line_2 FROM addresses | CREATE TABLE addresses (line_1 VARCHAR(255), line_2 VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 1 | {
"split": "train",
"row_index": 4239
} |
How many courses in total are listed? | SELECT COUNT(*) FROM Courses | CREATE TABLE Courses (Id VARCHAR(255), name VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 4240
} |
How is the math course described? | SELECT course_description FROM Courses WHERE course_name = 'math' | CREATE TABLE Courses (course_description VARCHAR(255), course_name VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 4241
} |
What is the zip code of the address in the city Port Chelsea? | SELECT zip_postcode FROM Addresses WHERE city = 'Port Chelsea' | CREATE TABLE Addresses (zip_postcode VARCHAR(255), city VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 4242
} |
Which department offers the most number of degrees? List department name and id. | SELECT T2.department_name, T1.department_id FROM Degree_Programs AS T1 JOIN Departments AS T2 ON T1.department_id = T2.department_id GROUP BY T1.department_id ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE Degree_Programs (department_id VARCHAR(255), program_name VARCHAR(255)); CREATE TABLE Departments (department_name VARCHAR(255), department_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 1 | {
"split": "train",
"row_index": 4243
} |
What is the name and id of the department with the most number of degrees ? | SELECT t2.department_name, t1.department_id FROM degree_programs AS t1 JOIN departments AS t2 ON t1.department_id = t2.department_id GROUP BY t1.department_id ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE degree_programs (department_id VARCHAR(255), program_name VARCHAR(255)); CREATE TABLE departments (department_name VARCHAR(255), department_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 1 | {
"split": "train",
"row_index": 4244
} |
How many departments offer any degree? | SELECT COUNT(DISTINCT department_id) FROM Degree_Programs | CREATE TABLE Degree_Programs (department_id VARCHAR(255), program_name VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 4245
} |
How many different degree names are offered? | SELECT COUNT(DISTINCT degree_summary_name) FROM Degree_Programs | CREATE TABLE Degree_Programs (degree_summary_name VARCHAR(255), degree_program_id VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 4246
} |
How many degrees does the engineering department offer? | SELECT COUNT(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer' | CREATE TABLE Degree_Programs (department_id VARCHAR(255), degree_name VARCHAR(255)); CREATE TABLE Departments (department_id VARCHAR(255), department_name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 4247
} |
What are the names and descriptions of all the sections? | SELECT section_name, section_description FROM Sections | CREATE TABLE Sections (section_name VARCHAR(255), section_description VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 1 | {
"split": "train",
"row_index": 4248
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.