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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
How many different locations does the school with code BUS has? | SELECT COUNT(DISTINCT dept_address) FROM department WHERE school_code = 'BUS' | CREATE TABLE department (dept_address VARCHAR(255), school_code VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1908
} |
How many different locations does each school have? | SELECT COUNT(DISTINCT dept_address), school_code FROM department GROUP BY school_code | CREATE TABLE department (school_code VARCHAR(255), dept_address VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 1909
} |
Find the description and credit for the course QM-261? | SELECT crs_credit, crs_description FROM course WHERE crs_code = 'QM-261' | CREATE TABLE course (crs_credit VARCHAR(255), crs_description VARCHAR(255), crs_code VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 1910
} |
Find the number of departments in each school. | SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code | CREATE TABLE department (school_code VARCHAR(255), dept_name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 1911
} |
Find the number of different departments in each school whose number of different departments is less than 5. | SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code HAVING COUNT(DISTINCT dept_name) < 5 | CREATE TABLE department (school_code VARCHAR(255), dept_name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 1912
} |
How many sections does each course has? | SELECT COUNT(*), crs_code FROM CLASS GROUP BY crs_code | CREATE TABLE CLASS (crs_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": 1913
} |
What is the total credit does each department offer? | SELECT SUM(crs_credit), dept_code FROM course GROUP BY dept_code | CREATE TABLE course (dept_code VARCHAR(255), crs_credit INTEGER) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 1914
} |
Find the number of classes offered for all class rooms that held at least 2 classes. | SELECT COUNT(*), class_room FROM CLASS GROUP BY class_room HAVING COUNT(*) >= 2 | CREATE TABLE CLASS (class_room 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": 1915
} |
Find the number of classes in each school. | 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 | CREATE TABLE department (school_code VARCHAR(255), dept_code VARCHAR(255)); CREATE TABLE CLASS (crs_code VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE course (crs_code VARCHAR(255), dept_code VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 1917
} |
What is the number of professors for different school? | 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 | CREATE TABLE department (school_code VARCHAR(255), dept_code VARCHAR(255)); CREATE TABLE professor (dept_code 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": 1918
} |
Find the count and code of the job has most employees. | SELECT emp_jobcode, COUNT(*) FROM employee GROUP BY emp_jobcode ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE employee (emp_jobcode VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 2 | {
"split": "train",
"row_index": 1919
} |
Which school has the smallest amount of professors? | 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 | CREATE TABLE department (school_code VARCHAR(255), dept_code VARCHAR(255)); CREATE TABLE professor (dept_code VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 0 | {
"split": "train",
"row_index": 1920
} |
Find the number of professors with a Ph.D. degree in each department. | SELECT COUNT(*), dept_code FROM professor WHERE prof_high_degree = 'Ph.D.' GROUP BY dept_code | CREATE TABLE professor (dept_code VARCHAR(255), prof_high_degree VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1921
} |
Find the number of students for each department. | SELECT COUNT(*), dept_code FROM student GROUP BY dept_code | CREATE TABLE student (dept_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": 1922
} |
Find the total number of hours have done for all students in each department. | SELECT SUM(stu_hrs), dept_code FROM student GROUP BY dept_code | CREATE TABLE student (dept_code VARCHAR(255), stu_hrs INTEGER) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 1923
} |
Find the max, average, and minimum gpa of all students in each department. | SELECT MAX(stu_gpa), AVG(stu_gpa), MIN(stu_gpa), dept_code FROM student GROUP BY dept_code | CREATE TABLE student (dept_code VARCHAR(255), stu_gpa INTEGER) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 2 | {
"split": "train",
"row_index": 1924
} |
What is the name and the average gpa of department whose students have the highest average gpa? | 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 ORDER BY AVG(T1.stu_gpa) DESC LIMIT 1 | CREATE TABLE department (dept_name VARCHAR(255), dept_code VARCHAR(255)); CREATE TABLE student (stu_gpa INTEGER, dept_code VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 2 | {
"split": "train",
"row_index": 1925
} |
how many schools exist in total? | SELECT COUNT(DISTINCT school_code) FROM department | CREATE TABLE department (school_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": 1926
} |
How many different classes are there? | SELECT COUNT(DISTINCT class_code) FROM CLASS | CREATE TABLE CLASS (class_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": 1927
} |
How many courses are offered? | SELECT COUNT(DISTINCT crs_code) FROM CLASS | CREATE TABLE CLASS (crs_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": 1928
} |
How many departments does the college has? | SELECT COUNT(DISTINCT dept_name) FROM department | CREATE TABLE department (dept_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": 1929
} |
How many sections does course ACCT-211 has? | SELECT COUNT(DISTINCT class_section) FROM CLASS WHERE crs_code = 'ACCT-211' | CREATE TABLE CLASS (class_section VARCHAR(255), crs_code VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1931
} |
Find the total credits of all classes offered by each department. | 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 | CREATE TABLE CLASS (crs_code VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE course (dept_code VARCHAR(255), crs_credit INTEGER, crs_code VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1932
} |
Find the name of the department that offers the largest number of credits of all classes. | 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 ORDER BY SUM(T1.crs_credit) DESC LIMIT 1 | CREATE TABLE CLASS (crs_code VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE department (dept_name VARCHAR(255), dept_code VARCHAR(255)); CREATE TABLE course (dept_code VARCHAR(255), crs_code VARCHAR(255), crs_credit INTEGER) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 5 | 0 | 0 | {
"split": "train",
"row_index": 1933
} |
How many students enrolled in class ACCT-211? | SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211' | CREATE TABLE enroll (class_code VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE CLASS (class_code VARCHAR(255), crs_code VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 1934
} |
What is the first name of each student enrolled in class ACCT-211? | 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' | CREATE TABLE student (stu_fname VARCHAR(255), stu_num VARCHAR(255)); CREATE TABLE CLASS (class_code VARCHAR(255), crs_code VARCHAR(255)); CREATE TABLE enroll (class_code VARCHAR(255), stu_num VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 1935
} |
What is the first name of students enrolled in class ACCT-211 and got grade C? | 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' | CREATE TABLE CLASS (class_code VARCHAR(255), crs_code VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE student (stu_fname VARCHAR(255), stu_num VARCHAR(255)); CREATE TABLE enroll (class_code VARCHAR(255), stu_num VARCHAR(255), enroll_grade VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 1936
} |
Find the total number of employees. | SELECT COUNT(*) FROM employee | CREATE TABLE employee (Id VARCHAR(255), name VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 1937
} |
How many professors do have a Ph.D. degree? | SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.' | CREATE TABLE professor (prof_high_degree 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": 1938
} |
How many students are enrolled in the class taught by some professor from the accounting department? | 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' | CREATE TABLE enroll (class_code VARCHAR(255), stu_num VARCHAR(255)); CREATE TABLE department (dept_code VARCHAR(255), dept_name VARCHAR(255)); CREATE TABLE course (crs_code VARCHAR(255), dept_code VARCHAR(255)); CREATE TABLE CLASS (class_code VARCHAR(255), crs_code VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 0 | {
"split": "train",
"row_index": 1939
} |
What is the name of the department that has the largest number of students enrolled? | 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 ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE enroll (class_code VARCHAR(255), stu_num VARCHAR(255)); CREATE TABLE CLASS (class_code VARCHAR(255), crs_code VARCHAR(255)); CREATE TABLE course (dept_code VARCHAR(255), crs_code VARCHAR(255)); CREATE TABLE department (dept_name VARCHAR(255), dept_code VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 6 | 0 | 0 | {
"split": "train",
"row_index": 1940
} |
list names of all departments ordered by their names. | SELECT dept_name FROM department ORDER BY dept_name | CREATE TABLE department (dept_name VARCHAR(255), dept_code VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1941
} |
List the codes of all courses that take place in room KLR209. | SELECT class_code FROM CLASS WHERE class_room = 'KLR209' | CREATE TABLE CLASS (class_code VARCHAR(255), class_room VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1942
} |
List the first name of all employees with job code PROF ordered by their date of birth. | SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' ORDER BY emp_dob | CREATE TABLE employee (emp_fname VARCHAR(255), emp_jobcode VARCHAR(255), emp_dob VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 1943
} |
Find the first names and offices of all professors sorted by alphabetical order of their first name. | 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 | CREATE TABLE professor (prof_office VARCHAR(255), emp_num VARCHAR(255)); CREATE TABLE employee (emp_fname VARCHAR(255), emp_num VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1944
} |
What is the first and last name of the oldest employee? | SELECT emp_fname, emp_lname FROM employee ORDER BY emp_dob LIMIT 1 | CREATE TABLE employee (emp_fname VARCHAR(255), emp_lname VARCHAR(255), emp_dob VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1945
} |
What is the first, last name, gpa of the youngest one among students whose GPA is above 3? | SELECT stu_fname, stu_lname, stu_gpa FROM student WHERE stu_gpa > 3 ORDER BY stu_dob DESC LIMIT 1 | CREATE TABLE student (stu_fname VARCHAR(255), stu_lname VARCHAR(255), stu_gpa INTEGER, stu_dob VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 1946
} |
What is the name of department where has the smallest number of professors? | SELECT T2.dept_name FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY COUNT(*) LIMIT 1 | CREATE TABLE professor (dept_code VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE department (dept_name VARCHAR(255), dept_code VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 0 | {
"split": "train",
"row_index": 1948
} |
What is the name of department where has the largest number of professors with a Ph.D. degree? | SELECT T2.dept_name, T1.dept_code FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.prof_high_degree = 'Ph.D.' GROUP BY T1.dept_code ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE professor (dept_code VARCHAR(255), prof_high_degree VARCHAR(255)); CREATE TABLE department (dept_name VARCHAR(255), dept_code VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 5 | 0 | 1 | {
"split": "train",
"row_index": 1949
} |
What is the first names of the professors from the history department who do not teach a class. | 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 | CREATE TABLE professor (emp_num VARCHAR(255), dept_code VARCHAR(255)); CREATE TABLE department (dept_code VARCHAR(255), dept_name VARCHAR(255)); CREATE TABLE CLASS (prof_num VARCHAR(255), class_code VARCHAR(255)); CREATE TABLE employee (emp_fname VARCHAR(255), emp_num VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 1 | 0 | {
"split": "train",
"row_index": 1951
} |
What is the last name and office of the professor from the history department? | 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' | CREATE TABLE department (dept_code VARCHAR(255), dept_name VARCHAR(255)); CREATE TABLE employee (emp_lname VARCHAR(255), emp_num VARCHAR(255)); CREATE TABLE professor (prof_office VARCHAR(255), emp_num VARCHAR(255), dept_code VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 1952
} |
What is department name and office for the professor whose last name is Heffington? | 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' | CREATE TABLE employee (emp_num VARCHAR(255), emp_lname VARCHAR(255)); CREATE TABLE department (dept_name VARCHAR(255), dept_code VARCHAR(255)); CREATE TABLE professor (prof_office VARCHAR(255), emp_num VARCHAR(255), dept_code VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 1953
} |
Find the last name and hire date of the professor who is in office DRE 102. | SELECT T1.emp_lname, T1.emp_hiredate FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num WHERE T2.prof_office = 'DRE 102' | CREATE TABLE professor (emp_num VARCHAR(255), prof_office VARCHAR(255)); CREATE TABLE employee (emp_lname VARCHAR(255), emp_hiredate VARCHAR(255), emp_num VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1954
} |
What is the code of the course which the student whose last name is Smithson took? | 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' | CREATE TABLE student (stu_num VARCHAR(255), stu_lname VARCHAR(255)); CREATE TABLE enroll (class_code VARCHAR(255), stu_num VARCHAR(255)); CREATE TABLE CLASS (crs_code VARCHAR(255), class_code VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 1955
} |
What are the description and credit of the course which the student whose last name is Smithson took? | 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' | CREATE TABLE student (stu_num VARCHAR(255), stu_lname VARCHAR(255)); CREATE TABLE course (crs_description VARCHAR(255), crs_credit VARCHAR(255), crs_code VARCHAR(255)); CREATE TABLE CLASS (class_code VARCHAR(255), crs_code VARCHAR(255)); CREATE TABLE enroll (class_code VARCHAR(255), stu_num VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 1 | {
"split": "train",
"row_index": 1956
} |
How many professors who has a either Ph.D. or MA degree? | SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.' OR prof_high_degree = 'MA' | CREATE TABLE professor (prof_high_degree 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": 1957
} |
How many professors who are from either Accounting or Biology department? | 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' | CREATE TABLE department (dept_code VARCHAR(255), dept_name VARCHAR(255)); CREATE TABLE professor (dept_code VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 1958
} |
Find the first name of student who is taking classes from accounting and Computer Info. Systems departments | 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 JOI... | CREATE TABLE CLASS (class_code VARCHAR(255), crs_code VARCHAR(255)); CREATE TABLE enroll (stu_num VARCHAR(255), class_code VARCHAR(255)); CREATE TABLE department (dept_code VARCHAR(255), dept_name VARCHAR(255)); CREATE TABLE course (crs_code VARCHAR(255), dept_code VARCHAR(255)); CREATE TABLE student (stu_fname VARCHAR... | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 5 | 1 | 0 | {
"split": "train",
"row_index": 1960
} |
What is the average gpa of the students enrolled in the course with code ACCT-211? | 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' | CREATE TABLE enroll (stu_num VARCHAR(255), class_code VARCHAR(255)); CREATE TABLE CLASS (class_code VARCHAR(255), crs_code VARCHAR(255)); CREATE TABLE student (stu_gpa INTEGER, stu_num VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 1961
} |
What is the first name, gpa and phone number of the top 5 students with highest gpa? | SELECT stu_gpa, stu_phone, stu_fname FROM student ORDER BY stu_gpa DESC LIMIT 5 | CREATE TABLE student (stu_gpa VARCHAR(255), stu_phone VARCHAR(255), stu_fname VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1962
} |
Find the first name and gpa of the students whose gpa is lower than the average gpa of all students. | SELECT stu_fname, stu_gpa FROM student WHERE stu_gpa < (SELECT AVG(stu_gpa) FROM student) | CREATE TABLE student (stu_fname VARCHAR(255), stu_gpa INTEGER) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 1 | {
"split": "train",
"row_index": 1964
} |
Find the name and address of the department that has the highest number of students. | 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 ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE student (dept_code VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE department (dept_name VARCHAR(255), dept_address VARCHAR(255), dept_code VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 1 | {
"split": "train",
"row_index": 1965
} |
Find the name, address, number of students in the departments that have the top 3 highest number of students. | 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 ORDER BY COUNT(*) DESC LIMIT 3 | CREATE TABLE student (dept_code VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE department (dept_name VARCHAR(255), dept_address VARCHAR(255), dept_code VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 2 | {
"split": "train",
"row_index": 1966
} |
Find the first name and office of the professor who is in the history department and has a Ph.D. degree. | 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.' | CREATE TABLE department (dept_code VARCHAR(255), dept_name VARCHAR(255)); CREATE TABLE professor (prof_office VARCHAR(255), emp_num VARCHAR(255), dept_code VARCHAR(255), prof_high_degree VARCHAR(255)); CREATE TABLE employee (emp_fname VARCHAR(255), emp_num VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 2 | {
"split": "train",
"row_index": 1967
} |
Find the first names of all instructors who have taught some course and the course code. | SELECT T2.emp_fname, T1.crs_code FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num | CREATE TABLE CLASS (crs_code VARCHAR(255), prof_num VARCHAR(255)); CREATE TABLE employee (emp_fname VARCHAR(255), emp_num VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 1968
} |
Find the first names of all instructors who have taught some course and the course description. | 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 | CREATE TABLE course (crs_description VARCHAR(255), crs_code VARCHAR(255)); CREATE TABLE CLASS (prof_num VARCHAR(255), crs_code VARCHAR(255)); CREATE TABLE employee (emp_fname VARCHAR(255), emp_num VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1969
} |
Find the first names and offices of all instructors who have taught some course and also find the course description. | 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 | CREATE TABLE professor (prof_office VARCHAR(255), emp_num VARCHAR(255)); CREATE TABLE course (crs_description VARCHAR(255), crs_code VARCHAR(255)); CREATE TABLE CLASS (prof_num VARCHAR(255), crs_code VARCHAR(255)); CREATE TABLE employee (emp_fname VARCHAR(255), emp_num VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 1970
} |
Find the first names and offices of all instructors who have taught some course and the course description and the department name. | 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 | CREATE TABLE employee (emp_fname VARCHAR(255), emp_num VARCHAR(255)); CREATE TABLE department (dept_name VARCHAR(255), dept_code VARCHAR(255)); CREATE TABLE course (crs_description VARCHAR(255), crs_code VARCHAR(255)); CREATE TABLE CLASS (prof_num VARCHAR(255), crs_code VARCHAR(255)); CREATE TABLE professor (prof_offic... | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 1 | {
"split": "train",
"row_index": 1971
} |
Find names of all students who took some course and the course description. | 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 | CREATE TABLE enroll (stu_num VARCHAR(255), class_code VARCHAR(255)); CREATE TABLE course (crs_description VARCHAR(255), crs_code VARCHAR(255)); CREATE TABLE CLASS (class_code VARCHAR(255), crs_code VARCHAR(255)); CREATE TABLE student (stu_fname VARCHAR(255), stu_lname VARCHAR(255), stu_num VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 1972
} |
Find names of all students who took some course and got A or C. | 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' | CREATE TABLE enroll (stu_num VARCHAR(255), enroll_grade VARCHAR(255)); CREATE TABLE student (stu_fname VARCHAR(255), stu_lname VARCHAR(255), stu_num VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 2 | {
"split": "train",
"row_index": 1973
} |
Find the first names of all professors in the Accounting department who is teaching some course and the class room. | 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' | CREATE TABLE CLASS (class_room VARCHAR(255), prof_num VARCHAR(255)); CREATE TABLE professor (emp_num VARCHAR(255), dept_code VARCHAR(255)); CREATE TABLE department (dept_code VARCHAR(255), dept_name VARCHAR(255)); CREATE TABLE employee (emp_fname VARCHAR(255), emp_num VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 1 | {
"split": "train",
"row_index": 1974
} |
Find the first names and degree of all professors who are teaching some class in Computer Info. Systems department. | 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' | CREATE TABLE professor (prof_high_degree VARCHAR(255), emp_num VARCHAR(255), dept_code VARCHAR(255)); CREATE TABLE department (dept_code VARCHAR(255), dept_name VARCHAR(255)); CREATE TABLE employee (emp_fname VARCHAR(255), emp_num VARCHAR(255)); CREATE TABLE CLASS (prof_num VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INC... | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 1 | {
"split": "train",
"row_index": 1975
} |
What is the last name of the student who got a grade A in the class with code 10018. | 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 | CREATE TABLE enroll (stu_num VARCHAR(255), enroll_grade VARCHAR(255), class_code VARCHAR(255)); CREATE TABLE student (stu_lname VARCHAR(255), stu_num VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 1976
} |
Find the first name and office of history professor who did not get a Ph.D. degree. | 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.' | CREATE TABLE department (dept_code VARCHAR(255), dept_name VARCHAR(255)); CREATE TABLE professor (prof_office VARCHAR(255), emp_num VARCHAR(255), dept_code VARCHAR(255), prof_high_degree VARCHAR(255)); CREATE TABLE employee (emp_fname VARCHAR(255), emp_num VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 2 | {
"split": "train",
"row_index": 1977
} |
Find the first names of professors who are teaching more than one class. | SELECT T2.emp_fname FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num GROUP BY T1.prof_num HAVING COUNT(*) > 1 | CREATE TABLE employee (emp_fname VARCHAR(255), emp_num VARCHAR(255)); CREATE TABLE CLASS (prof_num 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": 1978
} |
Find the first names of students who took exactly one class. | SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num GROUP BY T2.stu_num HAVING COUNT(*) = 1 | CREATE TABLE enroll (stu_num VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE student (stu_fname VARCHAR(255), stu_num VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 1979
} |
Find the name of department that offers the class whose description has the word "Statistics". | SELECT T2.dept_name FROM course AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.crs_description LIKE '%Statistics%' | CREATE TABLE course (dept_code VARCHAR(255), crs_description VARCHAR(255)); CREATE TABLE department (dept_code VARCHAR(255), dept_name VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 1980
} |
What is the first name of the student whose last name starting with the letter S and is taking ACCT-211 class? | 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 LIKE 'S%' | CREATE TABLE enroll (stu_num VARCHAR(255), class_code VARCHAR(255)); CREATE TABLE CLASS (class_code VARCHAR(255), crs_code VARCHAR(255)); CREATE TABLE student (stu_fname VARCHAR(255), stu_num VARCHAR(255), stu_lname VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 1 | {
"split": "train",
"row_index": 1981
} |
How many clubs are there? | SELECT COUNT(*) FROM club | CREATE TABLE club (Id VARCHAR(255), name VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 1982
} |
List the distinct region of clubs in ascending alphabetical order. | SELECT DISTINCT Region FROM club ORDER BY Region | CREATE TABLE club (Region 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": 1983
} |
What is the average number of gold medals for clubs? | SELECT AVG(Gold) FROM club_rank | CREATE TABLE club_rank (Gold 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": 1984
} |
What are the types and countries of competitions? | SELECT Competition_type, Country FROM competition | CREATE TABLE competition (Competition_type VARCHAR(255), Country VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 1 | {
"split": "train",
"row_index": 1985
} |
What are the distinct years in which the competitions type is not "Tournament"? | SELECT DISTINCT YEAR FROM competition WHERE Competition_type <> 'Tournament' | CREATE TABLE competition (YEAR VARCHAR(255), Competition_type VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1986
} |
What are the maximum and minimum number of silver medals for clubs. | SELECT MAX(Silver), MIN(Silver) FROM club_rank | CREATE TABLE club_rank (Silver 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": 1987
} |
How many clubs have total medals less than 10? | SELECT COUNT(*) FROM club_rank WHERE Total < 10 | CREATE TABLE club_rank (Total 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": 1988
} |
List all club names in ascending order of start year. | SELECT name FROM club ORDER BY Start_year | CREATE TABLE club (name VARCHAR(255), Start_year VARCHAR(255), End_year VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1989
} |
List all club names in descending alphabetical order. | SELECT name FROM club ORDER BY name DESC | CREATE TABLE club (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": 1990
} |
Please show the names and the players of clubs. | SELECT T1.name, T2.Player_id FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID | CREATE TABLE club (name VARCHAR(255), Club_ID VARCHAR(255)); CREATE TABLE player (Player_id VARCHAR(255), Club_ID VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 1991
} |
Show the names of clubs that have players with position "Right Wing". | SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T2.Position = 'Right Wing' | CREATE TABLE club (name VARCHAR(255), Club_ID VARCHAR(255)); CREATE TABLE player (Club_ID VARCHAR(255), Position VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 1992
} |
What is the average points of players from club with name "AIB". | SELECT AVG(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.name = 'AIB' | CREATE TABLE player (Points INTEGER, Club_ID VARCHAR(255)); CREATE TABLE club (Club_ID VARCHAR(255), name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 1993
} |
List the position of players and the average number of points of players of each position. | SELECT POSITION, AVG(Points) FROM player GROUP BY POSITION | CREATE TABLE player (POSITION VARCHAR(255), Points INTEGER) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 1994
} |
List the position of players with average number of points scored by players of that position bigger than 20. | SELECT POSITION FROM player GROUP BY name HAVING AVG(Points) >= 20 | CREATE TABLE player (POSITION VARCHAR(255), name VARCHAR(255), Points INTEGER) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 1995
} |
List the types of competition and the number of competitions of each type. | SELECT Competition_type, COUNT(*) FROM competition GROUP BY Competition_type | CREATE TABLE competition (Competition_type 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": 1996
} |
List the most common type of competition. | SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE competition (Competition_type 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": 1997
} |
List the types of competition that have at most five competitions of that type. | SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*) <= 5 | CREATE TABLE competition (Competition_type 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": 1998
} |
List the names of clubs that do not have any players. | SELECT name FROM CLub WHERE NOT Club_ID IN (SELECT Club_ID FROM player) | CREATE TABLE player (name VARCHAR(255), Club_ID VARCHAR(255)); CREATE TABLE CLub (name VARCHAR(255), Club_ID VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 1999
} |
What are the positions with both players having more than 20 points and less than 10 points. | SELECT POSITION FROM player WHERE Points > 20 INTERSECT SELECT POSITION FROM player WHERE Points < 10 | CREATE TABLE player (POSITION VARCHAR(255), Points INTEGER) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 2000
} |
Show total points of all players. | SELECT SUM(Points) FROM player | CREATE TABLE player (Points 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": 2001
} |
how many different positions are there? | SELECT COUNT(DISTINCT POSITION) FROM player | CREATE TABLE player (POSITION 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": 2002
} |
what are the name of players who get more than the average points. | SELECT name FROM player WHERE points > (SELECT AVG(points) FROM player) | CREATE TABLE player (name VARCHAR(255), points INTEGER) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 2003
} |
find the number of players whose points are lower than 30 in each position. | SELECT COUNT(*), POSITION FROM player WHERE points < 30 GROUP BY POSITION | CREATE TABLE player (POSITION VARCHAR(255), points INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2004
} |
which country did participated in the most number of Tournament competitions? | SELECT country FROM competition WHERE competition_type = 'Tournament' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE competition (country VARCHAR(255), competition_type VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 0 | {
"split": "train",
"row_index": 2005
} |
which countries did participated in both Friendly and Tournament type competitions. | SELECT country FROM competition WHERE competition_type = 'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type = 'Tournament' | CREATE TABLE competition (country VARCHAR(255), competition_type VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 2006
} |
Find the countries that have never participated in any competition with Friendly type. | SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type = 'Friendly' | CREATE TABLE competition (country VARCHAR(255), competition_type VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 1 | 0 | {
"split": "train",
"row_index": 2007
} |
How many furniture components are there in total? | SELECT SUM(num_of_component) FROM furniture | CREATE TABLE furniture (num_of_component 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": 2008
} |
Return the name and id of the furniture with the highest market rate. | SELECT name, furniture_id FROM furniture ORDER BY market_rate DESC LIMIT 1 | CREATE TABLE furniture (name VARCHAR(255), furniture_id VARCHAR(255), market_rate VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2009
} |
find the total market rate of the furnitures that have the top 2 market shares. | SELECT SUM(market_rate) FROM furniture ORDER BY market_rate DESC LIMIT 2 | CREATE TABLE furniture (market_rate INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2010
} |
Find the component amounts and names of all furnitures that have more than 10 components. | SELECT Num_of_Component, name FROM furniture WHERE Num_of_Component > 10 | CREATE TABLE furniture (Num_of_Component INTEGER, name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2011
} |
Find the name and component amount of the least popular furniture. | SELECT name, Num_of_Component FROM furniture ORDER BY market_rate LIMIT 1 | CREATE TABLE furniture (name VARCHAR(255), Num_of_Component VARCHAR(255), market_rate VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2012
} |
Which manufacturer has the most number of shops? List its name and year of opening. | SELECT open_year, name FROM manufacturer ORDER BY num_of_shops DESC LIMIT 1 | CREATE TABLE manufacturer (open_year VARCHAR(255), name VARCHAR(255), num_of_shops VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2014
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.