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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Which club has the most members majoring in "600"? | SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.major = '600' GROUP BY t1.clubname ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE student (stuid VARCHAR(255), major VARCHAR(255)); CREATE TABLE member_of_club (clubid VARCHAR(255), stuid VARCHAR(255)); CREATE TABLE club (clubname VARCHAR(255), clubid VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 6 | 0 | 0 | {
"split": "train",
"row_index": 2471
} |
Find the name of the club that has the most female students. | SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.sex = 'F' GROUP BY t1.clubname ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE student (stuid VARCHAR(255), sex VARCHAR(255)); CREATE TABLE member_of_club (clubid VARCHAR(255), stuid VARCHAR(255)); CREATE TABLE club (clubname VARCHAR(255), clubid VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 6 | 0 | 0 | {
"split": "train",
"row_index": 2472
} |
What is the description of the club named "Tennis Club"? | SELECT clubdesc FROM club WHERE clubname = 'Tennis Club' | CREATE TABLE club (clubdesc VARCHAR(255), clubname VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2473
} |
Find the description of the club "Pen and Paper Gaming". | SELECT clubdesc FROM club WHERE clubname = 'Pen and Paper Gaming' | CREATE TABLE club (clubdesc VARCHAR(255), clubname VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2474
} |
What is the location of the club named "Tennis Club"? | SELECT clublocation FROM club WHERE clubname = 'Tennis Club' | CREATE TABLE club (clublocation VARCHAR(255), clubname VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2475
} |
Find the location of the club "Pen and Paper Gaming". | SELECT clublocation FROM club WHERE clubname = 'Pen and Paper Gaming' | CREATE TABLE club (clublocation VARCHAR(255), clubname VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2476
} |
Where is the club "Hopkins Student Enterprises" located? | SELECT clublocation FROM club WHERE clubname = 'Hopkins Student Enterprises' | CREATE TABLE club (clublocation VARCHAR(255), clubname VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2477
} |
Find the name of all the clubs at "AKW". | SELECT clubname FROM club WHERE clublocation = 'AKW' | CREATE TABLE club (clubname VARCHAR(255), clublocation VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2478
} |
How many clubs are located at "HHH"? | SELECT COUNT(*) FROM club WHERE clublocation = 'HHH' | CREATE TABLE club (clublocation 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": 2479
} |
What are the first and last name of the president of the club "Bootup Baltimore"? | SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t2.position = 'President' | CREATE TABLE club (clubid VARCHAR(255), clubname VARCHAR(255)); CREATE TABLE student (fname VARCHAR(255), lname VARCHAR(255), stuid VARCHAR(255)); CREATE TABLE member_of_club (clubid VARCHAR(255), stuid VARCHAR(255), position VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 2 | {
"split": "train",
"row_index": 2480
} |
Who is the "CTO" of club "Hopkins Student Enterprises"? Show the first name and last name. | SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises' AND t2.position = 'CTO' | CREATE TABLE club (clubid VARCHAR(255), clubname VARCHAR(255)); CREATE TABLE student (fname VARCHAR(255), lname VARCHAR(255), stuid VARCHAR(255)); CREATE TABLE member_of_club (clubid VARCHAR(255), stuid VARCHAR(255), position VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 2 | {
"split": "train",
"row_index": 2481
} |
How many different roles are there in the club "Bootup Baltimore"? | SELECT COUNT(DISTINCT t2.position) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid WHERE t1.clubname = 'Bootup Baltimore' | CREATE TABLE club (clubid VARCHAR(255), clubname VARCHAR(255)); CREATE TABLE member_of_club (position VARCHAR(255), clubid VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2482
} |
How many members of "Bootup Baltimore" are older than 18? | SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.age > 18 | CREATE TABLE club (clubid VARCHAR(255), clubname VARCHAR(255)); CREATE TABLE student (stuid VARCHAR(255), age VARCHAR(255)); CREATE TABLE member_of_club (clubid VARCHAR(255), stuid VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 2483
} |
How many members of club "Bootup Baltimore" are younger than 18? | SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.age < 18 | CREATE TABLE club (clubid VARCHAR(255), clubname VARCHAR(255)); CREATE TABLE student (stuid VARCHAR(255), age VARCHAR(255)); CREATE TABLE member_of_club (clubid VARCHAR(255), stuid VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 2484
} |
Find the names of all the clubs that have at least a member from the city with city code "BAL". | SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = 'BAL' | CREATE TABLE member_of_club (clubid VARCHAR(255), stuid VARCHAR(255)); CREATE TABLE club (clubname VARCHAR(255), clubid VARCHAR(255)); CREATE TABLE student (stuid VARCHAR(255), city_code VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 2485
} |
Find the names of the clubs that have at least a member from the city with city code "HOU". | SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = 'HOU' | CREATE TABLE member_of_club (clubid VARCHAR(255), stuid VARCHAR(255)); CREATE TABLE club (clubname VARCHAR(255), clubid VARCHAR(255)); CREATE TABLE student (stuid VARCHAR(255), city_code VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 2486
} |
How many clubs does the student named "Eric Tai" belong to? | SELECT COUNT(DISTINCT t1.clubname) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Eric' AND t3.lname = 'Tai' | CREATE TABLE student (stuid VARCHAR(255), fname VARCHAR(255), lname VARCHAR(255)); CREATE TABLE member_of_club (clubid VARCHAR(255), stuid VARCHAR(255)); CREATE TABLE club (clubname VARCHAR(255), clubid VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 2487
} |
List the clubs having "Davis Steven" as a member. | SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Davis' AND t3.lname = 'Steven' | CREATE TABLE student (stuid VARCHAR(255), fname VARCHAR(255), lname VARCHAR(255)); CREATE TABLE member_of_club (clubid VARCHAR(255), stuid VARCHAR(255)); CREATE TABLE club (clubname VARCHAR(255), clubid VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 2488
} |
List the clubs that have at least a member with advisor "1121". | SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.advisor = 1121 | CREATE TABLE member_of_club (clubid VARCHAR(255), stuid VARCHAR(255)); CREATE TABLE club (clubname VARCHAR(255), clubid VARCHAR(255)); CREATE TABLE student (stuid VARCHAR(255), advisor VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 2489
} |
What is the average age of the members of the club "Bootup Baltimore"? | SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' | CREATE TABLE club (clubid VARCHAR(255), clubname VARCHAR(255)); CREATE TABLE student (age INTEGER, stuid VARCHAR(255)); CREATE TABLE member_of_club (clubid VARCHAR(255), stuid VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 2490
} |
Find the average age of members of the club "Hopkins Student Enterprises". | SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises' | CREATE TABLE club (clubid VARCHAR(255), clubname VARCHAR(255)); CREATE TABLE student (age INTEGER, stuid VARCHAR(255)); CREATE TABLE member_of_club (clubid VARCHAR(255), stuid VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 2491
} |
Retrieve the average age of members of the club "Tennis Club". | SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Tennis Club' | CREATE TABLE club (clubid VARCHAR(255), clubname VARCHAR(255)); CREATE TABLE student (age INTEGER, stuid VARCHAR(255)); CREATE TABLE member_of_club (clubid VARCHAR(255), stuid VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 2492
} |
List the project details of the project both producing patent and paper as outcomes. | SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent' | CREATE TABLE Project_outcomes (project_id VARCHAR(255), outcome_code VARCHAR(255)); CREATE TABLE Projects (project_details VARCHAR(255), project_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 1 | 0 | {
"split": "train",
"row_index": 2494
} |
List from which date and to which date these staff work: project staff of the project which hires the most staffs | SELECT date_from, date_to FROM Project_Staff WHERE project_id IN (SELECT project_id FROM Project_Staff GROUP BY project_id ORDER BY COUNT(*) DESC LIMIT 1) UNION SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'leader' | CREATE TABLE Project_Staff (date_from VARCHAR(255), date_to VARCHAR(255), project_id VARCHAR(255), role_code VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 2 | 1 | {
"split": "train",
"row_index": 2496
} |
Find the organisation ids and details of the organisations which are involved in | SELECT T2.organisation_id, T2.organisation_details FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_id HAVING SUM(T1.grant_amount) > 6000 | CREATE TABLE Grants (organisation_id VARCHAR(255), grant_amount INTEGER); CREATE TABLE Organisations (organisation_id VARCHAR(255), organisation_details VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2497
} |
What is the organisation type and id of the organisation which has the most number of research staff? | SELECT T1.organisation_type, T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE Research_Staff (employer_organisation_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE Organisations (organisation_type VARCHAR(255), organisation_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 1 | {
"split": "train",
"row_index": 2498
} |
Which organisation type hires most research staff? | SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE Research_Staff (employer_organisation_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE Organisations (organisation_type VARCHAR(255), organisation_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 0 | {
"split": "train",
"row_index": 2499
} |
Find out the send dates of the documents with the grant amount of more than 5000 were granted by organisation type described | SELECT T1.sent_date FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id = T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id = T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type = T4.organisation_type WHERE T2.grant_amount > 5000 AND T4.organisation_type_description = 'Research' | CREATE TABLE organisation_Types (organisation_type VARCHAR(255), organisation_type_description VARCHAR(255)); CREATE TABLE Grants (grant_id VARCHAR(255), organisation_id VARCHAR(255), grant_amount VARCHAR(255)); CREATE TABLE Organisations (organisation_id VARCHAR(255), organisation_type VARCHAR(255)); CREATE TABLE docu... | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 1 | {
"split": "train",
"row_index": 2500
} |
What are the response received dates for the documents described as 'Regular' or granted with more than 100? | SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code = T2.document_type_code JOIN Grants AS T3 ON T1.grant_id = T3.grant_id WHERE T2.document_description = 'Regular' OR T3.grant_amount > 100 | CREATE TABLE Documents (response_received_date VARCHAR(255), document_type_code VARCHAR(255), grant_id VARCHAR(255)); CREATE TABLE Document_Types (document_type_code VARCHAR(255), document_description VARCHAR(255)); CREATE TABLE Grants (grant_id VARCHAR(255), grant_amount VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 1 | {
"split": "train",
"row_index": 2501
} |
List the project details of the projects which did not hire any staff for a researcher role. | SELECT project_details FROM Projects WHERE NOT project_id IN (SELECT project_id FROM Project_Staff WHERE role_code = 'researcher') | CREATE TABLE Projects (project_details VARCHAR(255), project_id VARCHAR(255), role_code VARCHAR(255)); CREATE TABLE Project_Staff (project_details VARCHAR(255), project_id VARCHAR(255), role_code VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 2502
} |
What are the task details, task id and project id for the projects which are detailed as 'omnis' or have more than 2 outcomes? | SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'omnis' UNION SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id JOIN Project_outcomes AS T3 ON T2.proje... | CREATE TABLE Projects (project_id VARCHAR(255), project_details VARCHAR(255)); CREATE TABLE Project_outcomes (project_id VARCHAR(255), outcome_code VARCHAR(255)); CREATE TABLE Tasks (task_details VARCHAR(255), task_id VARCHAR(255), project_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 1 | 1 | {
"split": "train",
"row_index": 2503
} |
When do all the researcher role staff start to work, and when do they stop working? | SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'researcher' | CREATE TABLE Project_Staff (date_from VARCHAR(255), date_to VARCHAR(255), role_code VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2504
} |
How many kinds of roles are there for the staff? | SELECT COUNT(DISTINCT role_code) FROM Project_Staff | CREATE TABLE Project_Staff (role_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": 2505
} |
What is the total amount of grants given by each organisations? Also list the organisation id. | SELECT SUM(grant_amount), organisation_id FROM Grants GROUP BY organisation_id | CREATE TABLE Grants (organisation_id VARCHAR(255), grant_amount INTEGER) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2506
} |
List the project details of the projects with the research outcome described with the substring 'Published'. | SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code = T3.outcome_code WHERE T3.outcome_description LIKE '%Published%' | CREATE TABLE Research_outcomes (outcome_code VARCHAR(255), outcome_description VARCHAR(255)); CREATE TABLE Project_outcomes (project_id VARCHAR(255), outcome_code VARCHAR(255)); CREATE TABLE Projects (project_details VARCHAR(255), project_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 0 | {
"split": "train",
"row_index": 2507
} |
How many staff does each project has? List the project id and the number in an ascending order. | SELECT T1.project_id, COUNT(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY COUNT(*) | CREATE TABLE Project_Staff (project_id VARCHAR(255), staff_id VARCHAR(255)); CREATE TABLE Projects (project_id VARCHAR(255), project_details VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 2 | {
"split": "train",
"row_index": 2508
} |
What is the complete description of the researcher role. | SELECT role_description FROM Staff_Roles WHERE role_code = 'researcher' | CREATE TABLE Staff_Roles (role_description VARCHAR(255), role_code VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2509
} |
When did the first staff for the projects started working? | SELECT date_from FROM Project_Staff ORDER BY date_from LIMIT 1 | CREATE TABLE Project_Staff (date_from VARCHAR(255), date_to VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2510
} |
Which project made the most number of outcomes? List the project details and the project id. | SELECT T1.project_details, T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE Project_outcomes (project_id VARCHAR(255), outcome_code VARCHAR(255)); CREATE TABLE Projects (project_details VARCHAR(255), project_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 1 | {
"split": "train",
"row_index": 2511
} |
Which projects have no outcome? List the project details. | SELECT project_details FROM Projects WHERE NOT project_id IN (SELECT project_id FROM Project_outcomes) | CREATE TABLE Project_outcomes (project_details VARCHAR(255), project_id VARCHAR(255)); CREATE TABLE Projects (project_details VARCHAR(255), project_id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 2512
} |
Which organisation hired the most number of research staff? List the organisation id, type and detail. | SELECT T1.organisation_id, T1.organisation_type, T1.organisation_details FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE Organisations (organisation_id VARCHAR(255), organisation_type VARCHAR(255), organisation_details VARCHAR(255)); CREATE TABLE Research_Staff (employer_organisation_id VARCHAR(255), staff_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 1 | {
"split": "train",
"row_index": 2513
} |
Show the role description and the id of the project staff involved in most number of project outcomes? | SELECT T1.role_description, T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code = T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.staff_id ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE Project_outcomes (project_id VARCHAR(255), outcome_code VARCHAR(255)); CREATE TABLE Project_Staff (staff_id VARCHAR(255), role_code VARCHAR(255), project_id VARCHAR(255)); CREATE TABLE Staff_Roles (role_description VARCHAR(255), role_code VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 5 | 0 | 1 | {
"split": "train",
"row_index": 2514
} |
Which document type is described with the prefix 'Initial'? | SELECT document_type_code FROM Document_Types WHERE document_description LIKE 'Initial%' | CREATE TABLE Document_Types (document_type_code VARCHAR(255), document_description VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2515
} |
For grants with both documents described as 'Regular' and documents described as 'Initial Application', list its start date. | SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Regular' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOI... | CREATE TABLE Grants (grant_start_date VARCHAR(255), grant_id VARCHAR(255)); CREATE TABLE Document_Types (document_type_code VARCHAR(255), document_description VARCHAR(255)); CREATE TABLE Documents (grant_id VARCHAR(255), document_type_code VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 1 | 0 | {
"split": "train",
"row_index": 2516
} |
How many documents can one grant have at most? List the grant id and number. | SELECT grant_id, COUNT(*) FROM Documents GROUP BY grant_id ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE Documents (grant_id VARCHAR(255), document_id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 2 | {
"split": "train",
"row_index": 2517
} |
Find the organisation type description of the organisation detailed as 'quo'. | SELECT T1.organisation_type_description FROM organisation_Types AS T1 JOIN Organisations AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_details = 'quo' | CREATE TABLE Organisations (organisation_type VARCHAR(255), organisation_details VARCHAR(255)); CREATE TABLE organisation_Types (organisation_type_description VARCHAR(255), organisation_type VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2518
} |
How many Patent outcomes are generated from all the projects? | SELECT COUNT(*) FROM Project_outcomes WHERE outcome_code = 'Patent' | CREATE TABLE Project_outcomes (outcome_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": 2520
} |
How many project staff worked as leaders or started working before '1989-04-24 23:51:54'? | SELECT COUNT(*) FROM Project_Staff WHERE role_code = 'leader' OR date_from < '1989-04-24 23:51:54' | CREATE TABLE Project_Staff (role_code VARCHAR(255), date_from VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2521
} |
What is the last date of the staff leaving the projects? | SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1 | CREATE TABLE Project_Staff (date_to 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": 2522
} |
What are the result description of the project whose detail is 'sint'? | SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code JOIN Projects AS T3 ON T2.project_id = T3.project_id WHERE T3.project_details = 'sint' | CREATE TABLE Project_outcomes (outcome_code VARCHAR(255), project_id VARCHAR(255)); CREATE TABLE Research_outcomes (outcome_description VARCHAR(255), outcome_code VARCHAR(255)); CREATE TABLE Projects (project_id VARCHAR(255), project_details VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 2523
} |
List the organisation id with the maximum outcome count, and the count. | SELECT T1.organisation_id, COUNT(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE Project_outcomes (project_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE Projects (organisation_id VARCHAR(255), project_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 2 | {
"split": "train",
"row_index": 2524
} |
List the project details of the projects launched by the organisation | SELECT project_details FROM Projects WHERE organisation_id IN (SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY COUNT(*) DESC LIMIT 1) | CREATE TABLE Projects (project_details VARCHAR(255), organisation_id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 2525
} |
List the research staff details, and order in ascending order. | SELECT staff_details FROM Research_Staff ORDER BY staff_details | CREATE TABLE Research_Staff (staff_details 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": 2526
} |
How many tasks are there in total? | SELECT COUNT(*) FROM Tasks | CREATE TABLE Tasks (Id VARCHAR(255), task_name VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 2527
} |
How many tasks does each project have? List the task count and the project detail. | SELECT COUNT(*), T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id | CREATE TABLE Projects (project_details VARCHAR(255), project_id VARCHAR(255)); CREATE TABLE Tasks (project_id 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": 2528
} |
What are the staff roles of the staff who | SELECT role_code FROM Project_Staff WHERE date_from > '2003-04-19 15:06:20' AND date_to < '2016-03-15 00:33:18' | CREATE TABLE Project_Staff (role_code VARCHAR(255), date_from VARCHAR(255), date_to VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2529
} |
What are the descriptions of all the project outcomes? | SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code | CREATE TABLE Research_outcomes (outcome_description VARCHAR(255), outcome_code VARCHAR(255)); CREATE TABLE Project_outcomes (outcome_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": 2530
} |
Which role is most common for the staff? | SELECT role_code FROM Project_Staff GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE Project_Staff (role_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": 2531
} |
How many friends does Dan have? | SELECT COUNT(T2.friend) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Dan' | CREATE TABLE PersonFriend (friend VARCHAR(255), name VARCHAR(255)); CREATE TABLE Person (name VARCHAR(255), age INTEGER) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2532
} |
How many females does this network has? | SELECT COUNT(*) FROM Person WHERE gender = 'female' | CREATE TABLE Person (gender 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": 2533
} |
What is the average age for all person? | SELECT AVG(age) FROM Person | CREATE TABLE Person (age 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": 2534
} |
How many different cities are they from? | SELECT COUNT(DISTINCT city) FROM Person | CREATE TABLE Person (city 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": 2535
} |
How many type of jobs do they have? | SELECT COUNT(DISTINCT job) FROM Person | CREATE TABLE Person (job 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": 2536
} |
How old is the doctor named Zach? | SELECT age FROM Person WHERE job = 'doctor' AND name = 'Zach' | CREATE TABLE Person (age VARCHAR(255), job VARCHAR(255), name 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": 2540
} |
Who is the person whose age is below 30? | SELECT name FROM Person WHERE age < 30 | CREATE TABLE Person (name VARCHAR(255), 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": 2541
} |
How many people whose age is greater 30 and job is engineer? | SELECT COUNT(*) FROM Person WHERE age > 30 AND job = 'engineer' | CREATE TABLE Person (age VARCHAR(255), job 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": 2542
} |
What is the average age for each gender? | SELECT AVG(age), gender FROM Person GROUP BY gender | CREATE TABLE Person (gender VARCHAR(255), age INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2543
} |
What is average age for different job title? | SELECT AVG(age), job FROM Person GROUP BY job | CREATE TABLE Person (job VARCHAR(255), age INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2544
} |
What is average age of male for different job title? | SELECT AVG(age), job FROM Person WHERE gender = 'male' GROUP BY job | CREATE TABLE Person (job VARCHAR(255), age INTEGER, gender 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": 2545
} |
What is minimum age for different job title? | SELECT MIN(age), job FROM Person GROUP BY job | CREATE TABLE Person (job VARCHAR(255), age INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2546
} |
Find the number of people who is under 40 for each gender. | SELECT COUNT(*), gender FROM Person WHERE age < 40 GROUP BY gender | CREATE TABLE Person (gender VARCHAR(255), age 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": 2547
} |
list the name, job title of all people ordered by their names. | SELECT name, job FROM Person ORDER BY name | CREATE TABLE Person (name VARCHAR(255), job 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": 2550
} |
Find the names of all person sorted in the descending order using age. | SELECT name FROM Person ORDER BY age DESC | CREATE TABLE Person (name VARCHAR(255), age 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": 2551
} |
Find the name and age of all males in order of their age. | SELECT name FROM Person WHERE gender = 'male' ORDER BY age | CREATE TABLE Person (name VARCHAR(255), gender VARCHAR(255), age 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": 2552
} |
Find the name and age of the person who is a friend of both Dan and Alice. | SELECT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' INTERSECT SELECT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice' | CREATE TABLE Person (name VARCHAR(255), age VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE PersonFriend (name VARCHAR(255), friend VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 1 | 1 | {
"split": "train",
"row_index": 2553
} |
Find the name and age of the person who is a friend of Dan or Alice. | SELECT DISTINCT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' OR T2.friend = 'Alice' | CREATE TABLE Person (name VARCHAR(255), age VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE PersonFriend (name VARCHAR(255), friend 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": 2554
} |
Find the person who has exactly one friend. | SELECT name FROM PersonFriend GROUP BY name HAVING COUNT(*) = 1 | CREATE TABLE PersonFriend (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": 2558
} |
Who are the friends of Bob? | SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Bob' | CREATE TABLE PersonFriend (friend VARCHAR(255), name VARCHAR(255)); CREATE TABLE Person (name 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": 2559
} |
Find the name of persons who are friends with Bob. | SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Bob' | CREATE TABLE PersonFriend (name VARCHAR(255), friend VARCHAR(255)); CREATE TABLE Person (name 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": 2560
} |
Find the names of females who are friends with Zach | SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Zach' AND T1.gender = 'female' | CREATE TABLE PersonFriend (name VARCHAR(255), friend VARCHAR(255)); CREATE TABLE Person (name VARCHAR(255), gender VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2561
} |
Find the female friends of Alice. | SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'female' | CREATE TABLE PersonFriend (friend VARCHAR(255), name VARCHAR(255)); CREATE TABLE Person (name VARCHAR(255), gender VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2562
} |
Find the male friend of Alice whose job is a doctor? | SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'male' AND T1.job = 'doctor' | CREATE TABLE PersonFriend (friend VARCHAR(255), name VARCHAR(255)); CREATE TABLE Person (name VARCHAR(255), job VARCHAR(255), gender VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2563
} |
Who has a friend that is from new york city? | SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.city = 'new york city' | CREATE TABLE Person (name VARCHAR(255), city VARCHAR(255)); CREATE TABLE PersonFriend (name VARCHAR(255), friend VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2564
} |
Who is the friend of Zach with longest year relationship? | SELECT friend FROM PersonFriend WHERE name = 'Zach' AND YEAR = (SELECT MAX(YEAR) FROM PersonFriend WHERE name = 'Zach') | CREATE TABLE PersonFriend (friend VARCHAR(255), name VARCHAR(255), YEAR INTEGER) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 1 | {
"split": "train",
"row_index": 2567
} |
Find the name of persons who are friends with Alice for the shortest years. | SELECT name FROM PersonFriend WHERE friend = 'Alice' AND YEAR = (SELECT MIN(YEAR) FROM PersonFriend WHERE friend = 'Alice') | CREATE TABLE PersonFriend (name VARCHAR(255), friend VARCHAR(255), YEAR INTEGER) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 1 | {
"split": "train",
"row_index": 2569
} |
Who is the person that has no friend? | SELECT name FROM person EXCEPT SELECT name FROM PersonFriend | CREATE TABLE PersonFriend (name VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE person (name 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": 2571
} |
Which person whose friends have the oldest average age? | SELECT T2.name, AVG(T1.age) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend GROUP BY T2.name ORDER BY AVG(T1.age) DESC LIMIT 1 | CREATE TABLE PersonFriend (name VARCHAR(255), friend VARCHAR(255)); CREATE TABLE Person (age INTEGER, name VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 2 | {
"split": "train",
"row_index": 2572
} |
What is the total number of people who has no friend living in the city of Austin. | SELECT COUNT(DISTINCT name) FROM PersonFriend WHERE NOT friend IN (SELECT name FROM person WHERE city = 'Austin') | CREATE TABLE person (name VARCHAR(255), friend VARCHAR(255), city VARCHAR(255)); CREATE TABLE PersonFriend (name VARCHAR(255), friend VARCHAR(255), city VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 1 | {
"split": "train",
"row_index": 2573
} |
How many members are there? | SELECT COUNT(*) FROM member | CREATE TABLE member (Id VARCHAR(255), name VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 2575
} |
List the names of members in ascending alphabetical order. | SELECT Name FROM member ORDER BY Name | CREATE TABLE member (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": 2576
} |
What are the names and countries of members? | SELECT Name, Country FROM member | CREATE TABLE member (Name VARCHAR(255), Country VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 1 | {
"split": "train",
"row_index": 2577
} |
Show the names of members whose country is "United States" or "Canada". | SELECT Name FROM member WHERE Country = 'United States' OR Country = 'Canada' | CREATE TABLE member (Name VARCHAR(255), Country VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2578
} |
Show the different countries and the number of members from each. | SELECT Country, COUNT(*) FROM member GROUP BY Country | CREATE TABLE member (Country 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": 2579
} |
Show the most common country across members. | SELECT Country FROM member GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE member (Country 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": 2580
} |
Which countries have more than two members? | SELECT Country FROM member GROUP BY Country HAVING COUNT(*) > 2 | CREATE TABLE member (Country 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": 2581
} |
Show the leader names and locations of colleges. | SELECT Leader_Name, College_Location FROM college | CREATE TABLE college (Leader_Name VARCHAR(255), College_Location VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 1 | {
"split": "train",
"row_index": 2582
} |
Show the names of members and names of colleges they go to. | SELECT T2.Name, T1.Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID | CREATE TABLE member (Name VARCHAR(255), College_ID VARCHAR(255)); CREATE TABLE college (Name VARCHAR(255), College_ID VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2583
} |
Show the names of members and the locations of colleges they go to in ascending alphabetical order of member names. | SELECT T2.Name, T1.College_Location FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID ORDER BY T2.Name | CREATE TABLE member (Name VARCHAR(255), College_ID VARCHAR(255)); CREATE TABLE college (College_Location VARCHAR(255), College_ID VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2584
} |
Show the distinct leader names of colleges associated with members from country "Canada". | SELECT DISTINCT T1.Leader_Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID WHERE T2.Country = 'Canada' | CREATE TABLE college (Leader_Name VARCHAR(255), College_ID VARCHAR(255)); CREATE TABLE member (College_ID VARCHAR(255), Country VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2585
} |
Show the names of members and the decoration themes they have. | SELECT T1.Name, T2.Decoration_Theme FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID | CREATE TABLE member (Name VARCHAR(255), Member_ID VARCHAR(255)); CREATE TABLE round (Decoration_Theme VARCHAR(255), Member_ID VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2586
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.