NATURAL_LANG
stringlengths
12
244
SQL
stringlengths
18
336
SCHEMA
stringlengths
27
355
input_ids
list
attention_mask
list
labels
list
What is the day Number and date of all the documents?
SELECT T2.day_Number, T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored = T2.calendar_date
CREATE TABLE All_documents (Date_Stored VARCHAR, date_stored VARCHAR); CREATE TABLE Ref_calendar (day_Number VARCHAR, calendar_date VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 432, 834, 28244, 7, 41, 308, 342, 834, 28719, 26, 584, 4280, 28027, 6, 833, 834, 7154, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 419, 89, 834, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 4416, 1135, 834, 567, 5937, 49, 6, 332, 5411, 308, 342, 834, 28719, 26, 21680, 432, 834, 28244, 7, 6157, 332, 536, 3, 15355, 3162, 419, 89, 834, 1489, 35, 3439, 6157, 332, 357, 9191, 332, 5411, 5522, 834, 715...
What is the document type name for the document with name "How to read a book"?
SELECT T2.document_type_name FROM All_documents AS T1 JOIN Ref_document_types AS T2 ON T1.document_type_code = T2.document_type_code WHERE T1.document_name = "How to read a book"
CREATE TABLE Ref_document_types (document_type_name VARCHAR, document_type_code VARCHAR); CREATE TABLE All_documents (document_type_code VARCHAR, document_name VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 419, 89, 834, 28244, 834, 6137, 7, 41, 28244, 834, 6137, 834, 4350, 584, 4280, 28027, 6, 1708, 834, 6137, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 4416, 28244, 834, 6137, 834, 4350, 21680, 432, 834, 28244, 7, 6157, 332, 536, 3, 15355, 3162, 419, 89, 834, 28244, 834, 6137, 7, 6157, 332, 357, 9191, 332, 5411, 28244, 834, 6137, 834, 4978, 3274, 332, 4416, 28...
Show the number of locations.
SELECT COUNT(*) FROM Ref_locations
CREATE TABLE Ref_locations (Id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 419, 89, 834, 14836, 7, 41, 196, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3111, 8, 381, 13, 3248, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 419, 89, 834, 14836, 7, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
List all location codes and location names.
SELECT location_code, location_name FROM Ref_locations
CREATE TABLE Ref_locations (location_code VARCHAR, location_name VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 419, 89, 834, 14836, 7, 41, 14836, 834, 4978, 584, 4280, 28027, 6, 1128, 834, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6792, 66, 1128, 5633, 11, 1128, 3056, 5, 1, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1128, 834, 4978, 6, 1128, 834, 4350, 21680, 419, 89, 834, 14836, 7, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
What are the name and description for location code x?
SELECT location_name, location_description FROM Ref_locations WHERE location_code = "x"
CREATE TABLE Ref_locations (location_name VARCHAR, location_description VARCHAR, location_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 419, 89, 834, 14836, 7, 41, 14836, 834, 4350, 584, 4280, 28027, 6, 1128, 834, 221, 11830, 584, 4280, 28027, 6, 1128, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1128, 834, 4350, 6, 1128, 834, 221, 11830, 21680, 419, 89, 834, 14836, 7, 549, 17444, 427, 1128, 834, 4978, 3274, 96, 226, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
What is the location code for the country "Canada"?
SELECT location_code FROM Ref_locations WHERE location_name = "Canada"
CREATE TABLE Ref_locations (location_code VARCHAR, location_name VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 419, 89, 834, 14836, 7, 41, 14836, 834, 4978, 584, 4280, 28027, 6, 1128, 834, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 1128, 1081, 21, 8, 684, 96, 28811...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1128, 834, 4978, 21680, 419, 89, 834, 14836, 7, 549, 17444, 427, 1128, 834, 4350, 3274, 96, 28811, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
How many roles are there?
SELECT COUNT(*) FROM ROLES
CREATE TABLE ROLES (Id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 10264, 12335, 41, 196, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 6270, 33, 132, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 10264, 12335, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
List all role codes, role names, and role descriptions.
SELECT role_code, role_name, role_description FROM ROLES
CREATE TABLE ROLES (role_code VARCHAR, role_name VARCHAR, role_description VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 10264, 12335, 41, 3491, 15, 834, 4978, 584, 4280, 28027, 6, 1075, 834, 4350, 584, 4280, 28027, 6, 1075, 834, 221, 11830, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6792, 66, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1075, 834, 4978, 6, 1075, 834, 4350, 6, 1075, 834, 221, 11830, 21680, 10264, 12335, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
What are the name and description for role code "MG"?
SELECT role_name, role_description FROM ROLES WHERE role_code = "MG"
CREATE TABLE ROLES (role_name VARCHAR, role_description VARCHAR, role_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 10264, 12335, 41, 3491, 15, 834, 4350, 584, 4280, 28027, 6, 1075, 834, 221, 11830, 584, 4280, 28027, 6, 1075, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1075, 834, 4350, 6, 1075, 834, 221, 11830, 21680, 10264, 12335, 549, 17444, 427, 1075, 834, 4978, 3274, 96, 9306, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Show the description for role name "Proof Reader".
SELECT role_description FROM ROLES WHERE role_name = "Proof Reader"
CREATE TABLE ROLES (role_description VARCHAR, role_name VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 10264, 12335, 41, 3491, 15, 834, 221, 11830, 584, 4280, 28027, 6, 1075, 834, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3111, 8, 4210, 21, 1075, 564, 96, 3174, 858, 161...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1075, 834, 221, 11830, 21680, 10264, 12335, 549, 17444, 427, 1075, 834, 4350, 3274, 96, 3174, 858, 16120, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Show the name, role code, and date of birth for the employee with name 'Armani'.
SELECT employee_name, role_code, date_of_birth FROM Employees WHERE employee_Name = 'Armani'
CREATE TABLE Employees (employee_name VARCHAR, role_code VARCHAR, date_of_birth VARCHAR, employee_Name VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 15871, 7, 41, 15, 51, 7379, 63, 15, 15, 834, 4350, 584, 4280, 28027, 6, 1075, 834, 4978, 584, 4280, 28027, 6, 833, 834, 858, 834, 20663, 584, 4280, 28027, 6, 3490, 834, 23954, 584, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3490, 834, 4350, 6, 1075, 834, 4978, 6, 833, 834, 858, 834, 20663, 21680, 15871, 7, 549, 17444, 427, 3490, 834, 23954, 3274, 3, 31, 23823, 2738, 31, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
What is the id for the employee called Ebba?
SELECT employee_ID FROM Employees WHERE employee_name = "Ebba"
CREATE TABLE Employees (employee_ID VARCHAR, employee_name VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 15871, 7, 41, 15, 51, 7379, 63, 15, 15, 834, 4309, 584, 4280, 28027, 6, 3490, 834, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 3, 23, 26, 21, 8, 3490, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 3490, 834, 4309, 21680, 15871, 7, 549, 17444, 427, 3490, 834, 4350, 3274, 96, 427, 115, 115, 9, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
Show the names of all the employees with role "HR".
SELECT employee_name FROM Employees WHERE role_code = "HR"
CREATE TABLE Employees (employee_name VARCHAR, role_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 15871, 7, 41, 15, 51, 7379, 63, 15, 15, 834, 4350, 584, 4280, 28027, 6, 1075, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3111, 8, 3056, 13, 66, 8, 1652, 28, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 3490, 834, 4350, 21680, 15871, 7, 549, 17444, 427, 1075, 834, 4978, 3274, 96, 11120, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Show all role codes and the number of employees in each role.
SELECT role_code, COUNT(*) FROM Employees GROUP BY role_code
CREATE TABLE Employees (role_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 15871, 7, 41, 3491, 15, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3111, 66, 1075, 5633, 11, 8, 381, 13, 1652, 16, 284, 1075, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1075, 834, 4978, 6, 2847, 17161, 599, 1935, 61, 21680, 15871, 7, 350, 4630, 6880, 272, 476, 1075, 834, 4978, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
What is the role code with the largest number of employees?
SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE Employees (role_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 15871, 7, 41, 3491, 15, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 1075, 1081, 28, 8, 2015, 381, 13, 1652, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1075, 834, 4978, 21680, 15871, 7, 350, 4630, 6880, 272, 476, 1075, 834, 4978, 4674, 11300, 272, 476, 2847, 17161, 599, 1935, 61, 309, 25067, 8729, 12604, 209, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Show all role codes with at least 3 employees.
SELECT role_code FROM Employees GROUP BY role_code HAVING COUNT(*) >= 3
CREATE TABLE Employees (role_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 15871, 7, 41, 3491, 15, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3111, 66, 1075, 5633, 28, 44, 709, 220, 1652, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1075, 834, 4978, 21680, 15871, 7, 350, 4630, 6880, 272, 476, 1075, 834, 4978, 454, 6968, 2365, 2847, 17161, 599, 1935, 61, 2490, 2423, 220, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
Show the role code with the least employees.
SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) LIMIT 1
CREATE TABLE Employees (role_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 15871, 7, 41, 3491, 15, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3111, 8, 1075, 1081, 28, 8, 709, 1652, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1075, 834, 4978, 21680, 15871, 7, 350, 4630, 6880, 272, 476, 1075, 834, 4978, 4674, 11300, 272, 476, 2847, 17161, 599, 1935, 61, 8729, 12604, 209, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
What is the role name and role description for employee called Ebba?
SELECT T2.role_name, T2.role_description FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T1.employee_name = "Ebba"
CREATE TABLE Employees (role_code VARCHAR, employee_name VARCHAR); CREATE TABLE ROLES (role_name VARCHAR, role_description VARCHAR, role_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 15871, 7, 41, 3491, 15, 834, 4978, 584, 4280, 28027, 6, 3490, 834, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 10264, 12335, 41, 3491, 15, 834, 435...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 4416, 3491, 15, 834, 4350, 6, 332, 4416, 3491, 15, 834, 221, 11830, 21680, 15871, 7, 6157, 332, 536, 3, 15355, 3162, 10264, 12335, 6157, 332, 357, 9191, 332, 5411, 3491, 15, 834, 4978, 3274, 332, 4416, 3491, 15...
Show the names of employees with role name Editor.
SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = "Editor"
CREATE TABLE ROLES (role_code VARCHAR, role_name VARCHAR); CREATE TABLE Employees (employee_name VARCHAR, role_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 10264, 12335, 41, 3491, 15, 834, 4978, 584, 4280, 28027, 6, 1075, 834, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 15871, 7, 41, 15, 51, 7379, 63, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 15, 51, 7379, 63, 15, 15, 834, 4350, 21680, 15871, 7, 6157, 332, 536, 3, 15355, 3162, 10264, 12335, 6157, 332, 357, 9191, 332, 5411, 3491, 15, 834, 4978, 3274, 332, 4416, 3491, 15, 834, 4978, 549, 17444, ...
Show the employee ids for all employees with role name "Human Resource" or "Manager".
SELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = "Human Resource" OR T2.role_name = "Manager"
CREATE TABLE Employees (employee_id VARCHAR, role_code VARCHAR); CREATE TABLE ROLES (role_code VARCHAR, role_name VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 15871, 7, 41, 15, 51, 7379, 63, 15, 15, 834, 23, 26, 584, 4280, 28027, 6, 1075, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 10264, 12335, 41...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 15, 51, 7379, 63, 15, 15, 834, 23, 26, 21680, 15871, 7, 6157, 332, 536, 3, 15355, 3162, 10264, 12335, 6157, 332, 357, 9191, 332, 5411, 3491, 15, 834, 4978, 3274, 332, 4416, 3491, 15, 834, 4978, 549, 174...
What are the different location codes for documents?
SELECT DISTINCT location_code FROM Document_locations
CREATE TABLE Document_locations (location_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 834, 14836, 7, 41, 14836, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 315, 1128, 5633, 21, 2691, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 1128, 834, 4978, 21680, 11167, 834, 14836, 7, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Show the location name for document "Robin CV".
SELECT T3.location_name FROM All_documents AS T1 JOIN Document_locations AS T2 ON T1.document_id = T2.document_id JOIN Ref_locations AS T3 ON T2.location_code = T3.location_code WHERE T1.document_name = "Robin CV"
CREATE TABLE Ref_locations (location_name VARCHAR, location_code VARCHAR); CREATE TABLE All_documents (document_id VARCHAR, document_name VARCHAR); CREATE TABLE Document_locations (document_id VARCHAR, location_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 419, 89, 834, 14836, 7, 41, 14836, 834, 4350, 584, 4280, 28027, 6, 1128, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 432, 834, 28244, 7, 41, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5787, 14836, 834, 4350, 21680, 432, 834, 28244, 7, 6157, 332, 536, 3, 15355, 3162, 11167, 834, 14836, 7, 6157, 332, 357, 9191, 332, 5411, 28244, 834, 23, 26, 3274, 332, 4416, 28244, 834, 23, 26, 3, 15355, 3162,...
Show the location code, the starting date and ending data in that location for all the documents.
SELECT location_code, date_in_location_from, date_in_locaton_to FROM Document_locations
CREATE TABLE Document_locations (location_code VARCHAR, date_in_location_from VARCHAR, date_in_locaton_to VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 834, 14836, 7, 41, 14836, 834, 4978, 584, 4280, 28027, 6, 833, 834, 77, 834, 14836, 834, 7152, 584, 4280, 28027, 6, 833, 834, 77, 834, 5133, 144, 106, 834, 235, 584, 4280, 280...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 1128, 834, 4978, 6, 833, 834, 77, 834, 14836, 834, 7152, 6, 833, 834, 77, 834, 5133, 144, 106, 834, 235, 21680, 11167, 834, 14836, 7, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
What is "the date in location from" and "the date in location to" for the document with name "Robin CV"?
SELECT T1.date_in_location_from, T1.date_in_locaton_to FROM Document_locations AS T1 JOIN All_documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = "Robin CV"
CREATE TABLE All_documents (document_id VARCHAR, document_name VARCHAR); CREATE TABLE Document_locations (date_in_location_from VARCHAR, date_in_locaton_to VARCHAR, document_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 432, 834, 28244, 7, 41, 28244, 834, 23, 26, 584, 4280, 28027, 6, 1708, 834, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 11167, 834, 14836, 7, 41, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 5522, 834, 77, 834, 14836, 834, 7152, 6, 332, 5411, 5522, 834, 77, 834, 5133, 144, 106, 834, 235, 21680, 11167, 834, 14836, 7, 6157, 332, 536, 3, 15355, 3162, 432, 834, 28244, 7, 6157, 332, 357, 9191, 3...
Show the location codes and the number of documents in each location.
SELECT location_code, COUNT(*) FROM Document_locations GROUP BY location_code
CREATE TABLE Document_locations (location_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 834, 14836, 7, 41, 14836, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3111, 8, 1128, 5633, 11, 8, 381, 13, 2691, 16, 284, 1128, 5, 1, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1128, 834, 4978, 6, 2847, 17161, 599, 1935, 61, 21680, 11167, 834, 14836, 7, 350, 4630, 6880, 272, 476, 1128, 834, 4978, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
What is the location code with the most documents?
SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE Document_locations (location_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 834, 14836, 7, 41, 14836, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 1128, 1081, 28, 8, 167, 2691, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1128, 834, 4978, 21680, 11167, 834, 14836, 7, 350, 4630, 6880, 272, 476, 1128, 834, 4978, 4674, 11300, 272, 476, 2847, 17161, 599, 1935, 61, 309, 25067, 8729, 12604, 209, 1, -100, -100, -100, -100, -100, -100, -100, -...
Show the location codes with at least 3 documents.
SELECT location_code FROM Document_locations GROUP BY location_code HAVING COUNT(*) >= 3
CREATE TABLE Document_locations (location_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 834, 14836, 7, 41, 14836, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3111, 8, 1128, 5633, 28, 44, 709, 220, 2691, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1128, 834, 4978, 21680, 11167, 834, 14836, 7, 350, 4630, 6880, 272, 476, 1128, 834, 4978, 454, 6968, 2365, 2847, 17161, 599, 1935, 61, 2490, 2423, 220, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
Show the location name and code with the least documents.
SELECT T2.location_name, T1.location_code FROM Document_locations AS T1 JOIN Ref_locations AS T2 ON T1.location_code = T2.location_code GROUP BY T1.location_code ORDER BY COUNT(*) LIMIT 1
CREATE TABLE Document_locations (location_code VARCHAR); CREATE TABLE Ref_locations (location_name VARCHAR, location_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 834, 14836, 7, 41, 14836, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 419, 89, 834, 14836, 7, 41, 14836, 834, 4350, 584, 4280, 28027, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 4416, 14836, 834, 4350, 6, 332, 5411, 14836, 834, 4978, 21680, 11167, 834, 14836, 7, 6157, 332, 536, 3, 15355, 3162, 419, 89, 834, 14836, 7, 6157, 332, 357, 9191, 332, 5411, 14836, 834, 4978, 3274, 332, 4416, 1...
What are the names of the employees who authorised the destruction and the employees who destroyed the corresponding documents?
SELECT T2.employee_name, T3.employee_name FROM Documents_to_be_destroyed AS T1 JOIN Employees AS T2 ON T1.Destruction_Authorised_by_Employee_ID = T2.employee_id JOIN Employees AS T3 ON T1.Destroyed_by_Employee_ID = T3.employee_id
CREATE TABLE Employees (employee_name VARCHAR, employee_id VARCHAR); CREATE TABLE Documents_to_be_destroyed (Destruction_Authorised_by_Employee_ID VARCHAR, Destroyed_by_Employee_ID VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 15871, 7, 41, 15, 51, 7379, 63, 15, 15, 834, 4350, 584, 4280, 28027, 6, 3490, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 11167, 7, 834, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 4416, 15, 51, 7379, 63, 15, 15, 834, 4350, 6, 332, 5787, 15, 51, 7379, 63, 15, 15, 834, 4350, 21680, 11167, 7, 834, 235, 834, 346, 834, 221, 6626, 10093, 6157, 332, 536, 3, 15355, 3162, 15871, 7, 6157, 332,...
Show the id of each employee and the number of document destruction authorised by that employee.
SELECT Destruction_Authorised_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID
CREATE TABLE Documents_to_be_destroyed (Destruction_Authorised_by_Employee_ID VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 834, 235, 834, 346, 834, 221, 6626, 10093, 41, 2962, 7, 26853, 834, 23602, 127, 3375, 834, 969, 834, 427, 51, 7379, 63, 15, 15, 834, 4309, 584, 4280, 28027, 61, 3, 32105, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 2973, 26853, 834, 23602, 127, 3375, 834, 969, 834, 427, 51, 7379, 63, 15, 15, 834, 4309, 6, 2847, 17161, 599, 1935, 61, 21680, 11167, 7, 834, 235, 834, 346, 834, 221, 6626, 10093, 350, 4630, 6880, 272, 476, 2973, ...
Show the employee ids and the number of documents destroyed by each employee.
SELECT Destroyed_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID
CREATE TABLE Documents_to_be_destroyed (Destroyed_by_Employee_ID VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 834, 235, 834, 346, 834, 221, 6626, 10093, 41, 2962, 6626, 10093, 834, 969, 834, 427, 51, 7379, 63, 15, 15, 834, 4309, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 3, 23143, 14196, 374, 6626, 10093, 834, 969, 834, 427, 51, 7379, 63, 15, 15, 834, 4309, 6, 2847, 17161, 599, 1935, 61, 21680, 11167, 7, 834, 235, 834, 346, 834, 221, 6626, 10093, 350, 4630, 6880, 272, 476, 374, 6626, 10093, 834, 9...
Show the ids of the employees who don't authorize destruction for any document.
SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
CREATE TABLE Documents_to_be_destroyed (employee_id VARCHAR, Destruction_Authorised_by_Employee_ID VARCHAR); CREATE TABLE Employees (employee_id VARCHAR, Destruction_Authorised_by_Employee_ID VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 834, 235, 834, 346, 834, 221, 6626, 10093, 41, 15, 51, 7379, 63, 15, 15, 834, 23, 26, 584, 4280, 28027, 6, 2973, 26853, 834, 23602, 127, 3375, 834, 969, 834, 427, 51, 737...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3490, 834, 23, 26, 21680, 15871, 7, 262, 4, 30416, 3, 23143, 14196, 2973, 26853, 834, 23602, 127, 3375, 834, 969, 834, 427, 51, 7379, 63, 15, 15, 834, 4309, 21680, 11167, 7, 834, 235, 834, 346, 834, 221, 6626, 100...
Show the ids of all employees who have authorized destruction.
SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
CREATE TABLE Documents_to_be_destroyed (Destruction_Authorised_by_Employee_ID VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 834, 235, 834, 346, 834, 221, 6626, 10093, 41, 2962, 7, 26853, 834, 23602, 127, 3375, 834, 969, 834, 427, 51, 7379, 63, 15, 15, 834, 4309, 584, 4280, 28027, 61, 3, 32105, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 2973, 26853, 834, 23602, 127, 3375, 834, 969, 834, 427, 51, 7379, 63, 15, 15, 834, 4309, 21680, 11167, 7, 834, 235, 834, 346, 834, 221, 6626, 10093, 1, -100, -100, -100, -100, -100, -100, -100...
Show the ids of all employees who have destroyed a document.
SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed
CREATE TABLE Documents_to_be_destroyed (Destroyed_by_Employee_ID VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 834, 235, 834, 346, 834, 221, 6626, 10093, 41, 2962, 6626, 10093, 834, 969, 834, 427, 51, 7379, 63, 15, 15, 834, 4309, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 374, 6626, 10093, 834, 969, 834, 427, 51, 7379, 63, 15, 15, 834, 4309, 21680, 11167, 7, 834, 235, 834, 346, 834, 221, 6626, 10093, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Show the ids of all employees who don't destroy any document.
SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed
CREATE TABLE Employees (employee_id VARCHAR, Destroyed_by_Employee_ID VARCHAR); CREATE TABLE Documents_to_be_destroyed (employee_id VARCHAR, Destroyed_by_Employee_ID VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 15871, 7, 41, 15, 51, 7379, 63, 15, 15, 834, 23, 26, 584, 4280, 28027, 6, 374, 6626, 10093, 834, 969, 834, 427, 51, 7379, 63, 15, 15, 834, 4309, 584, 4280, 28027, 61, 3, 32105, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3490, 834, 23, 26, 21680, 15871, 7, 262, 4, 30416, 3, 23143, 14196, 374, 6626, 10093, 834, 969, 834, 427, 51, 7379, 63, 15, 15, 834, 4309, 21680, 11167, 7, 834, 235, 834, 346, 834, 221, 6626, 10093, 1, -100, -100,...
Show the ids of all employees who have either destroyed a document or made an authorization to do this.
SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
CREATE TABLE Documents_to_be_destroyed (Destroyed_by_Employee_ID VARCHAR, Destruction_Authorised_by_Employee_ID VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 834, 235, 834, 346, 834, 221, 6626, 10093, 41, 2962, 6626, 10093, 834, 969, 834, 427, 51, 7379, 63, 15, 15, 834, 4309, 584, 4280, 28027, 6, 2973, 26853, 834, 23602, 127, 33...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 374, 6626, 10093, 834, 969, 834, 427, 51, 7379, 63, 15, 15, 834, 4309, 21680, 11167, 7, 834, 235, 834, 346, 834, 221, 6626, 10093, 4417, 9215, 3, 23143, 14196, 2973, 26853, 834, 23602, 127, 3375, 834, 969, 834, 427,...
What are the names of all clubs?
SELECT clubname FROM club
CREATE TABLE club (clubname VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 3056, 13, 66, 8122, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1886, 4350, 21680, 1886, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
How many students are there?
SELECT COUNT(*) FROM student
CREATE TABLE student (Id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1236, 41, 196, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 481, 33, 132, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 1236, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
What are the first names of all the students?
SELECT DISTINCT fname FROM student
CREATE TABLE student (fname VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1236, 41, 89, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 166, 3056, 13, 66, 8, 481, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 3, 89, 4350, 21680, 1236, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
Find the last names of the members of the club "Bootup Baltimore".
SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore"
CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (lname VARCHAR, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 23, 26, 584, 4280, 28027, 6, 1886, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1236, 41, 40, 4350, 584, 4280, 28027, 6, 21341, 23,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 17, 5787, 40, 4350, 21680, 1886, 6157, 3, 17, 536, 3, 15355, 3162, 1144, 834, 858, 834, 13442, 6157, 3, 17, 357, 9191, 3, 17, 5411, 13442, 23, 26, 3274, 3, 17, 4416, 13442, 23, 26, 3, 15355, 3162, 1236, 6157,...
Who are the members of the club named "Hopkins Student Enterprises"? Show the last name.
SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Hopkins Student Enterprises"
CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (lname VARCHAR, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 23, 26, 584, 4280, 28027, 6, 1886, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1236, 41, 40, 4350, 584, 4280, 28027, 6, 21341, 23,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 17, 5787, 40, 4350, 21680, 1886, 6157, 3, 17, 536, 3, 15355, 3162, 1144, 834, 858, 834, 13442, 6157, 3, 17, 357, 9191, 3, 17, 5411, 13442, 23, 26, 3274, 3, 17, 4416, 13442, 23, 26, 3, 15355, 3162, 1236, 6157,...
How many members does the club "Tennis Club" has?
SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Tennis Club"
CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE student (stuid VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 23, 26, 584, 4280, 28027, 6, 1886, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1144, 834, 858, 834, 13442, 41, 13442, 23, 26, 584,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 1886, 6157, 3, 17, 536, 3, 15355, 3162, 1144, 834, 858, 834, 13442, 6157, 3, 17, 357, 9191, 3, 17, 5411, 13442, 23, 26, 3274, 3, 17, 4416, 13442, 23, 26, 3, 15355, 3162, 1236, ...
Find the number of members of club "Pen and Paper Gaming".
SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Pen and Paper Gaming"
CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE student (stuid VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 23, 26, 584, 4280, 28027, 6, 1886, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1144, 834, 858, 834, 13442, 41, 13442, 23, 26, 584,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 1886, 6157, 3, 17, 536, 3, 15355, 3162, 1144, 834, 858, 834, 13442, 6157, 3, 17, 357, 9191, 3, 17, 5411, 13442, 23, 26, 3274, 3, 17, 4416, 13442, 23, 26, 3, 15355, 3162, 1236, ...
How many clubs does "Linda Smith" belong to?
SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = "Linda" AND t3.lname = "Smith"
CREATE TABLE student (stuid VARCHAR, fname VARCHAR, lname VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubid VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1236, 41, 7, 17, 76, 23, 26, 584, 4280, 28027, 6, 3, 89, 4350, 584, 4280, 28027, 6, 3, 40, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1144, 83...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 1886, 6157, 3, 17, 536, 3, 15355, 3162, 1144, 834, 858, 834, 13442, 6157, 3, 17, 357, 9191, 3, 17, 5411, 13442, 23, 26, 3274, 3, 17, 4416, 13442, 23, 26, 3, 15355, 3162, 1236, ...
Find the number of clubs where "Tracy Kim" is a member.
SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = "Tracy" AND t3.lname = "Kim"
CREATE TABLE student (stuid VARCHAR, fname VARCHAR, lname VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubid VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1236, 41, 7, 17, 76, 23, 26, 584, 4280, 28027, 6, 3, 89, 4350, 584, 4280, 28027, 6, 3, 40, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1144, 83...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 1886, 6157, 3, 17, 536, 3, 15355, 3162, 1144, 834, 858, 834, 13442, 6157, 3, 17, 357, 9191, 3, 17, 5411, 13442, 23, 26, 3274, 3, 17, 4416, 13442, 23, 26, 3, 15355, 3162, 1236, ...
Find all the female members of club "Bootup Baltimore". 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 = "Bootup Baltimore" AND t3.sex = "F"
CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (fname VARCHAR, lname VARCHAR, stuid VARCHAR, sex VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 23, 26, 584, 4280, 28027, 6, 1886, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1236, 41, 89, 4350, 584, 4280, 28027, 6, 3, 40, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 17, 5787, 89, 4350, 6, 3, 17, 5787, 40, 4350, 21680, 1886, 6157, 3, 17, 536, 3, 15355, 3162, 1144, 834, 858, 834, 13442, 6157, 3, 17, 357, 9191, 3, 17, 5411, 13442, 23, 26, 3274, 3, 17, 4416, 13442, 23, 26,...
Find all the male members 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 t3.sex = "M"
CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (fname VARCHAR, lname VARCHAR, stuid VARCHAR, sex VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 23, 26, 584, 4280, 28027, 6, 1886, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1236, 41, 89, 4350, 584, 4280, 28027, 6, 3, 40, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 17, 5787, 89, 4350, 6, 3, 17, 5787, 40, 4350, 21680, 1886, 6157, 3, 17, 536, 3, 15355, 3162, 1144, 834, 858, 834, 13442, 6157, 3, 17, 357, 9191, 3, 17, 5411, 13442, 23, 26, 3274, 3, 17, 4416, 13442, 23, 26,...
Find all members of "Bootup Baltimore" whose major is "600". 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 = "Bootup Baltimore" AND t3.major = "600"
CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE student (fname VARCHAR, lname VARCHAR, stuid VARCHAR, major VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 23, 26, 584, 4280, 28027, 6, 1886, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1144, 834, 858, 834, 13442, 41, 13442, 23, 26, 584,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 17, 5787, 89, 4350, 6, 3, 17, 5787, 40, 4350, 21680, 1886, 6157, 3, 17, 536, 3, 15355, 3162, 1144, 834, 858, 834, 13442, 6157, 3, 17, 357, 9191, 3, 17, 5411, 13442, 23, 26, 3274, 3, 17, 4416, 13442, 23, 26,...
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, major VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1236, 41, 7, 17, 76, 23, 26, 584, 4280, 28027, 6, 779, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1144, 834, 858, 834, 13442, 41, 13442, 23, 26, 584, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 17, 5411, 13442, 4350, 21680, 1886, 6157, 3, 17, 536, 3, 15355, 3162, 1144, 834, 858, 834, 13442, 6157, 3, 17, 357, 9191, 3, 17, 5411, 13442, 23, 26, 3274, 3, 17, 4416, 13442, 23, 26, 3, 15355, 3162, 1236, 61...
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, sex VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1236, 41, 7, 17, 76, 23, 26, 584, 4280, 28027, 6, 3, 7, 994, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1144, 834, 858, 834, 13442, 41, 13442, 23, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 17, 5411, 13442, 4350, 21680, 1886, 6157, 3, 17, 536, 3, 15355, 3162, 1144, 834, 858, 834, 13442, 6157, 3, 17, 357, 9191, 3, 17, 5411, 13442, 23, 26, 3274, 3, 17, 4416, 13442, 23, 26, 3, 15355, 3162, 1236, 61...
What is the description of the club named "Tennis Club"?
SELECT clubdesc FROM club WHERE clubname = "Tennis Club"
CREATE TABLE club (clubdesc VARCHAR, clubname VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 26, 1579, 584, 4280, 28027, 6, 1886, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 4210, 13, 8, 1886, 2650, 96, 382, 35, 29, 159, 1949, 121,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1886, 26, 1579, 21680, 1886, 549, 17444, 427, 1886, 4350, 3274, 96, 382, 35, 29, 159, 1949, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
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, clubname VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 26, 1579, 584, 4280, 28027, 6, 1886, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 4210, 13, 8, 1886, 96, 345, 35, 11, 6564, 18613, 1280, 1, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1886, 26, 1579, 21680, 1886, 549, 17444, 427, 1886, 4350, 3274, 96, 345, 35, 11, 6564, 18613, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
What is the location of the club named "Tennis Club"?
SELECT clublocation FROM club WHERE clubname = "Tennis Club"
CREATE TABLE club (clublocation VARCHAR, clubname VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 14836, 584, 4280, 28027, 6, 1886, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 1128, 13, 8, 1886, 2650, 96, 382, 35, 29, 159, 1949, 121, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1886, 14836, 21680, 1886, 549, 17444, 427, 1886, 4350, 3274, 96, 382, 35, 29, 159, 1949, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
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, clubname VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 14836, 584, 4280, 28027, 6, 1886, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 1128, 13, 8, 1886, 96, 345, 35, 11, 6564, 18613, 1280, 1, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1886, 14836, 21680, 1886, 549, 17444, 427, 1886, 4350, 3274, 96, 345, 35, 11, 6564, 18613, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Where is the club "Hopkins Student Enterprises" located?
SELECT clublocation FROM club WHERE clubname = "Hopkins Student Enterprises"
CREATE TABLE club (clublocation VARCHAR, clubname VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 14836, 584, 4280, 28027, 6, 1886, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2840, 19, 8, 1886, 96, 4489, 102, 7815, 6341, 8526, 7, 121, 1069, 58, 1, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1886, 14836, 21680, 1886, 549, 17444, 427, 1886, 4350, 3274, 96, 4489, 102, 7815, 6341, 8526, 7, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Find the name of all the clubs at "AKW".
SELECT clubname FROM club WHERE clublocation = "AKW"
CREATE TABLE club (clubname VARCHAR, clublocation VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 4350, 584, 4280, 28027, 6, 1886, 14836, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 564, 13, 66, 8, 8122, 44, 96, 188, 18796, 1280, 1, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1886, 4350, 21680, 1886, 549, 17444, 427, 1886, 14836, 3274, 96, 188, 18796, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
How many clubs are located at "HHH"?
SELECT COUNT(*) FROM club WHERE clublocation = "HHH"
CREATE TABLE club (clublocation VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 14836, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 8122, 33, 1069, 44, 96, 566, 23123, 121, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 1886, 549, 17444, 427, 1886, 14836, 3274, 96, 566, 23123, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
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, clubname VARCHAR); CREATE TABLE student (fname VARCHAR, lname VARCHAR, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR, position VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 23, 26, 584, 4280, 28027, 6, 1886, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1236, 41, 89, 4350, 584, 4280, 28027, 6, 3, 40, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 17, 5787, 89, 4350, 6, 3, 17, 5787, 40, 4350, 21680, 1886, 6157, 3, 17, 536, 3, 15355, 3162, 1144, 834, 858, 834, 13442, 6157, 3, 17, 357, 9191, 3, 17, 5411, 13442, 23, 26, 3274, 3, 17, 4416, 13442, 23, 26,...
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, clubname VARCHAR); CREATE TABLE student (fname VARCHAR, lname VARCHAR, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR, position VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 23, 26, 584, 4280, 28027, 6, 1886, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1236, 41, 89, 4350, 584, 4280, 28027, 6, 3, 40, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 17, 5787, 89, 4350, 6, 3, 17, 5787, 40, 4350, 21680, 1886, 6157, 3, 17, 536, 3, 15355, 3162, 1144, 834, 858, 834, 13442, 6157, 3, 17, 357, 9191, 3, 17, 5411, 13442, 23, 26, 3274, 3, 17, 4416, 13442, 23, 26,...
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, clubname VARCHAR); CREATE TABLE member_of_club (position VARCHAR, clubid VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 23, 26, 584, 4280, 28027, 6, 1886, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1144, 834, 858, 834, 13442, 41, 4718, 584, 4280, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 2847, 17161, 599, 15438, 25424, 6227, 3, 17, 4416, 4718, 61, 21680, 1886, 6157, 3, 17, 536, 3, 15355, 3162, 1144, 834, 858, 834, 13442, 6157, 3, 17, 357, 9191, 3, 17, 5411, 13442, 23, 26, 3274, 3, 17, 4416, 13442,...
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, clubname VARCHAR); CREATE TABLE student (stuid VARCHAR, age VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 23, 26, 584, 4280, 28027, 6, 1886, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1236, 41, 7, 17, 76, 23, 26, 584, 4280, 28027, 6,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 1886, 6157, 3, 17, 536, 3, 15355, 3162, 1144, 834, 858, 834, 13442, 6157, 3, 17, 357, 9191, 3, 17, 5411, 13442, 23, 26, 3274, 3, 17, 4416, 13442, 23, 26, 3, 15355, 3162, 1236, ...
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, clubname VARCHAR); CREATE TABLE student (stuid VARCHAR, age VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 23, 26, 584, 4280, 28027, 6, 1886, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1236, 41, 7, 17, 76, 23, 26, 584, 4280, 28027, 6,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 1886, 6157, 3, 17, 536, 3, 15355, 3162, 1144, 834, 858, 834, 13442, 6157, 3, 17, 357, 9191, 3, 17, 5411, 13442, 23, 26, 3274, 3, 17, 4416, 13442, 23, 26, 3, 15355, 3162, 1236, ...
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, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR); CREATE TABLE student (stuid VARCHAR, city_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1144, 834, 858, 834, 13442, 41, 13442, 23, 26, 584, 4280, 28027, 6, 21341, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 4350, 584...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 3, 17, 5411, 13442, 4350, 21680, 1886, 6157, 3, 17, 536, 3, 15355, 3162, 1144, 834, 858, 834, 13442, 6157, 3, 17, 357, 9191, 3, 17, 5411, 13442, 23, 26, 3274, 3, 17, 4416, 13442, 23, 26, 3...
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, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR); CREATE TABLE student (stuid VARCHAR, city_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1144, 834, 858, 834, 13442, 41, 13442, 23, 26, 584, 4280, 28027, 6, 21341, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 4350, 584...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 3, 17, 5411, 13442, 4350, 21680, 1886, 6157, 3, 17, 536, 3, 15355, 3162, 1144, 834, 858, 834, 13442, 6157, 3, 17, 357, 9191, 3, 17, 5411, 13442, 23, 26, 3274, 3, 17, 4416, 13442, 23, 26, 3...
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, fname VARCHAR, lname VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1236, 41, 7, 17, 76, 23, 26, 584, 4280, 28027, 6, 3, 89, 4350, 584, 4280, 28027, 6, 3, 40, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1144, 83...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 2847, 17161, 599, 15438, 25424, 6227, 3, 17, 5411, 13442, 4350, 61, 21680, 1886, 6157, 3, 17, 536, 3, 15355, 3162, 1144, 834, 858, 834, 13442, 6157, 3, 17, 357, 9191, 3, 17, 5411, 13442, 23, 26, 3274, 3, 17, 4416,...
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, fname VARCHAR, lname VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1236, 41, 7, 17, 76, 23, 26, 584, 4280, 28027, 6, 3, 89, 4350, 584, 4280, 28027, 6, 3, 40, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1144, 83...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 3, 17, 5411, 13442, 4350, 21680, 1886, 6157, 3, 17, 536, 3, 15355, 3162, 1144, 834, 858, 834, 13442, 6157, 3, 17, 357, 9191, 3, 17, 5411, 13442, 23, 26, 3274, 3, 17, 4416, 13442, 23, 26, 3...
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, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR); CREATE TABLE student (stuid VARCHAR, advisor VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1144, 834, 858, 834, 13442, 41, 13442, 23, 26, 584, 4280, 28027, 6, 21341, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 4350, 584...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 3, 17, 5411, 13442, 4350, 21680, 1886, 6157, 3, 17, 536, 3, 15355, 3162, 1144, 834, 858, 834, 13442, 6157, 3, 17, 357, 9191, 3, 17, 5411, 13442, 23, 26, 3274, 3, 17, 4416, 13442, 23, 26, 3...
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, clubname VARCHAR); CREATE TABLE student (age INTEGER, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 23, 26, 584, 4280, 28027, 6, 1886, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1236, 41, 545, 3, 21342, 17966, 6, 21341, 23, 26, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 71, 17217, 599, 17, 5787, 545, 61, 21680, 1886, 6157, 3, 17, 536, 3, 15355, 3162, 1144, 834, 858, 834, 13442, 6157, 3, 17, 357, 9191, 3, 17, 5411, 13442, 23, 26, 3274, 3, 17, 4416, 13442, 23, 26, 3, 15355, 3162,...
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, clubname VARCHAR); CREATE TABLE student (age INTEGER, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 23, 26, 584, 4280, 28027, 6, 1886, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1236, 41, 545, 3, 21342, 17966, 6, 21341, 23, 26, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 71, 17217, 599, 17, 5787, 545, 61, 21680, 1886, 6157, 3, 17, 536, 3, 15355, 3162, 1144, 834, 858, 834, 13442, 6157, 3, 17, 357, 9191, 3, 17, 5411, 13442, 23, 26, 3274, 3, 17, 4416, 13442, 23, 26, 3, 15355, 3162,...
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, clubname VARCHAR); CREATE TABLE student (age INTEGER, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1886, 41, 13442, 23, 26, 584, 4280, 28027, 6, 1886, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1236, 41, 545, 3, 21342, 17966, 6, 21341, 23, 26, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 71, 17217, 599, 17, 5787, 545, 61, 21680, 1886, 6157, 3, 17, 536, 3, 15355, 3162, 1144, 834, 858, 834, 13442, 6157, 3, 17, 357, 9191, 3, 17, 5411, 13442, 23, 26, 3274, 3, 17, 4416, 13442, 23, 26, 3, 15355, 3162,...
What are the distinct grant amount for the grants where the documents were sent before '1986-08-26 20:49:27' and grant were ended after '1989-03-16 18:27:16'?
SELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id WHERE T2.sent_date < '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date > '1989-03-16 18:27:16'
CREATE TABLE grants (grant_amount VARCHAR, grant_end_date INTEGER); CREATE TABLE Grants (grant_amount VARCHAR, grant_id VARCHAR); CREATE TABLE Documents (grant_id VARCHAR, sent_date INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11133, 41, 7662, 17, 834, 9, 11231, 584, 4280, 28027, 6, 5334, 834, 989, 834, 5522, 3, 21342, 17966, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 8059, 7, 41, 7662, 17, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 7662, 17, 834, 9, 11231, 21680, 8059, 7, 6157, 332, 536, 3, 15355, 3162, 11167, 7, 6157, 332, 357, 9191, 332, 5411, 7662, 17, 834, 23, 26, 3274, 332, 4416, 7662, 17, 834, 23, 26, 549, 17444, 427, 332, ...
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, outcome_code VARCHAR); CREATE TABLE Projects (project_details VARCHAR, project_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2786, 834, 670, 287, 15, 7, 41, 23574, 834, 23, 26, 584, 4280, 28027, 6, 6138, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 2786, 7, 41, 2357...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 23574, 834, 221, 5756, 7, 21680, 2786, 7, 6157, 332, 536, 3, 15355, 3162, 2786, 834, 670, 287, 15, 7, 6157, 332, 357, 9191, 332, 5411, 23574, 834, 23, 26, 3274, 332, 4416, 23574, 834, 23, 26, 549, 17444...
What is the total grant amount of the organisations described as research?
SELECT SUM(grant_amount) FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type = T3.organisation_type WHERE T3.organisation_type_description = 'Research'
CREATE TABLE organisation_Types (organisation_type VARCHAR, organisation_type_description VARCHAR); CREATE TABLE Grants (organisation_id VARCHAR); CREATE TABLE Organisations (organisation_id VARCHAR, organisation_type VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5102, 834, 25160, 7, 41, 10832, 834, 6137, 584, 4280, 28027, 6, 5102, 834, 6137, 834, 221, 11830, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 8059, 7, 41...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 180, 6122, 599, 7662, 17, 834, 9, 11231, 61, 21680, 8059, 7, 6157, 332, 536, 3, 15355, 3162, 11033, 7, 6157, 332, 357, 9191, 332, 5411, 10832, 834, 23, 26, 3274, 332, 4416, 10832, 834, 23, 26, 3, 15355, 3162, 5102...
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, date_to VARCHAR, project_id VARCHAR, role_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2786, 834, 134, 17, 4127, 41, 5522, 834, 7152, 584, 4280, 28027, 6, 833, 834, 235, 584, 4280, 28027, 6, 516, 834, 23, 26, 584, 4280, 28027, 6, 1075, 834, 4978, 584, 4280, 28027, 61, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 833, 834, 7152, 6, 833, 834, 235, 21680, 2786, 834, 134, 17, 4127, 549, 17444, 427, 516, 834, 23, 26, 3388, 41, 23143, 14196, 516, 834, 23, 26, 21680, 2786, 834, 134, 17, 4127, 350, 4630, 6880, 272, 476, 516, 834,...
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, grant_amount INTEGER); CREATE TABLE Organisations (organisation_id VARCHAR, organisation_details VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 8059, 7, 41, 10832, 834, 23, 26, 584, 4280, 28027, 6, 5334, 834, 9, 11231, 3, 21342, 17966, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 11033, 7, 41, 10832, 834, 23, 26,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 4416, 10832, 834, 23, 26, 6, 332, 4416, 10832, 834, 221, 5756, 7, 21680, 8059, 7, 6157, 332, 536, 3, 15355, 3162, 11033, 7, 6157, 332, 357, 9191, 332, 5411, 10832, 834, 23, 26, 3274, 332, 4416, 10832, 834, 23...
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); CREATE TABLE Organisations (organisation_type VARCHAR, organisation_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2200, 834, 134, 17, 4127, 41, 15, 1167, 28014, 834, 10832, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 11033, 7, 41, 10832, 834, 6137, 584, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 10832, 834, 6137, 6, 332, 5411, 10832, 834, 23, 26, 21680, 11033, 7, 6157, 332, 536, 3, 15355, 3162, 2200, 834, 134, 17, 4127, 6157, 332, 357, 9191, 332, 5411, 10832, 834, 23, 26, 3274, 332, 4416, 15, 1...
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); CREATE TABLE Organisations (organisation_type VARCHAR, organisation_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2200, 834, 134, 17, 4127, 41, 15, 1167, 28014, 834, 10832, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 11033, 7, 41, 10832, 834, 6137, 584, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 10832, 834, 6137, 21680, 11033, 7, 6157, 332, 536, 3, 15355, 3162, 2200, 834, 134, 17, 4127, 6157, 332, 357, 9191, 332, 5411, 10832, 834, 23, 26, 3274, 332, 4416, 15, 1167, 28014, 834, 10832, 834, 23, 26,...
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, organisation_type_description VARCHAR); CREATE TABLE Grants (grant_id VARCHAR, organisation_id VARCHAR, grant_amount VARCHAR); CREATE TABLE Organisations (organisation_id VARCHAR, organisation_type VARCHAR); CREATE TABLE documents (sent_date VARCHAR, grant_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5102, 834, 25160, 7, 41, 10832, 834, 6137, 584, 4280, 28027, 6, 5102, 834, 6137, 834, 221, 11830, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 8059, 7, 41...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 5277, 834, 5522, 21680, 2691, 6157, 332, 536, 3, 15355, 3162, 8059, 7, 6157, 332, 357, 9191, 332, 5411, 7662, 17, 834, 23, 26, 3274, 332, 4416, 7662, 17, 834, 23, 26, 3, 15355, 3162, 11033, 7, 6157, 332...
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, document_type_code VARCHAR, grant_id VARCHAR); CREATE TABLE Document_Types (document_type_code VARCHAR, document_description VARCHAR); CREATE TABLE Grants (grant_id VARCHAR, grant_amount VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 41, 60, 7, 5041, 7, 15, 834, 60, 565, 757, 26, 834, 5522, 584, 4280, 28027, 6, 1708, 834, 6137, 834, 4978, 584, 4280, 28027, 6, 5334, 834, 23, 26, 584, 4280, 28027, 61, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 60, 7, 5041, 7, 15, 834, 60, 565, 757, 26, 834, 5522, 21680, 11167, 7, 6157, 332, 536, 3, 15355, 3162, 11167, 834, 25160, 7, 6157, 332, 357, 9191, 332, 5411, 28244, 834, 6137, 834, 4978, 3274, 332, 4416...
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, project_id VARCHAR, role_code VARCHAR); CREATE TABLE Project_Staff (project_details VARCHAR, project_id VARCHAR, role_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2786, 7, 41, 23574, 834, 221, 5756, 7, 584, 4280, 28027, 6, 516, 834, 23, 26, 584, 4280, 28027, 6, 1075, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 516, 834, 221, 5756, 7, 21680, 2786, 7, 549, 17444, 427, 4486, 516, 834, 23, 26, 3388, 41, 23143, 14196, 516, 834, 23, 26, 21680, 2786, 834, 134, 17, 4127, 549, 17444, 427, 1075, 834, 4978, 3274, 3, 31, 60, 13173,...
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, date_to VARCHAR, role_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2786, 834, 134, 17, 4127, 41, 5522, 834, 7152, 584, 4280, 28027, 6, 833, 834, 235, 584, 4280, 28027, 6, 1075, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 366, 103, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 833, 834, 7152, 6, 833, 834, 235, 21680, 2786, 834, 134, 17, 4127, 549, 17444, 427, 1075, 834, 4978, 3274, 3, 31, 60, 13173, 49, 31, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
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)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2786, 834, 134, 17, 4127, 41, 3491, 15, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 4217, 13, 6270, 33, 132, 21, 8, 871, 58, 1, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 15438, 25424, 6227, 1075, 834, 4978, 61, 21680, 2786, 834, 134, 17, 4127, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
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, grant_amount INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 8059, 7, 41, 10832, 834, 23, 26, 584, 4280, 28027, 6, 5334, 834, 9, 11231, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 792, 866, 13, 11133, 787, 57, 284, 6445, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 180, 6122, 599, 7662, 17, 834, 9, 11231, 201, 5102, 834, 23, 26, 21680, 8059, 7, 350, 4630, 6880, 272, 476, 5102, 834, 23, 26, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
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, outcome_description VARCHAR); CREATE TABLE Project_outcomes (project_id VARCHAR, outcome_code VARCHAR); CREATE TABLE Projects (project_details VARCHAR, project_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2200, 834, 670, 287, 15, 7, 41, 670, 287, 15, 834, 4978, 584, 4280, 28027, 6, 6138, 834, 221, 11830, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 2786, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 23574, 834, 221, 5756, 7, 21680, 2786, 7, 6157, 332, 536, 3, 15355, 3162, 2786, 834, 670, 287, 15, 7, 6157, 332, 357, 9191, 332, 5411, 23574, 834, 23, 26, 3274, 332, 4416, 23574, 834, 23, 26, 3, 15355, ...
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); CREATE TABLE Projects (project_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2786, 834, 134, 17, 4127, 41, 23574, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 2786, 7, 41, 23574, 834, 23, 26, 584, 4280, 28027, 61, 3,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 23574, 834, 23, 26, 6, 2847, 17161, 599, 1935, 61, 21680, 2786, 834, 134, 17, 4127, 6157, 332, 536, 3, 15355, 3162, 2786, 7, 6157, 332, 357, 9191, 332, 5411, 23574, 834, 23, 26, 3274, 332, 4416, 23574, ...
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, role_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 10071, 834, 448, 32, 965, 41, 3491, 15, 834, 221, 11830, 584, 4280, 28027, 6, 1075, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 743, 4210, 13, 8, 1865...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1075, 834, 221, 11830, 21680, 10071, 834, 448, 32, 965, 549, 17444, 427, 1075, 834, 4978, 3274, 3, 31, 60, 13173, 49, 31, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
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)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2786, 834, 134, 17, 4127, 41, 5522, 834, 7152, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 366, 410, 8, 166, 871, 21, 8, 1195, 708, 464, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 833, 834, 7152, 21680, 2786, 834, 134, 17, 4127, 4674, 11300, 272, 476, 833, 834, 7152, 8729, 12604, 209, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
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); CREATE TABLE Projects (project_details VARCHAR, project_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2786, 834, 670, 287, 15, 7, 41, 23574, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 2786, 7, 41, 23574, 834, 221, 5756, 7, 584, 4280, 28027...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 23574, 834, 221, 5756, 7, 6, 332, 5411, 23574, 834, 23, 26, 21680, 2786, 7, 6157, 332, 536, 3, 15355, 3162, 2786, 834, 670, 287, 15, 7, 6157, 332, 357, 9191, 332, 5411, 23574, 834, 23, 26, 3274, 332, ...
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, project_id VARCHAR); CREATE TABLE Projects (project_details VARCHAR, project_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2786, 834, 670, 287, 15, 7, 41, 23574, 834, 221, 5756, 7, 584, 4280, 28027, 6, 516, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 2786, 7, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 516, 834, 221, 5756, 7, 21680, 2786, 7, 549, 17444, 427, 4486, 516, 834, 23, 26, 3388, 41, 23143, 14196, 516, 834, 23, 26, 21680, 2786, 834, 670, 287, 15, 7, 61, 1, -100, -100, -100, -100, -100, -100, -100, -100, ...
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, organisation_type VARCHAR, organisation_details VARCHAR); CREATE TABLE Research_Staff (employer_organisation_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11033, 7, 41, 10832, 834, 23, 26, 584, 4280, 28027, 6, 5102, 834, 6137, 584, 4280, 28027, 6, 5102, 834, 221, 5756, 7, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 10832, 834, 23, 26, 6, 332, 5411, 10832, 834, 6137, 6, 332, 5411, 10832, 834, 221, 5756, 7, 21680, 11033, 7, 6157, 332, 536, 3, 15355, 3162, 2200, 834, 134, 17, 4127, 6157, 332, 357, 9191, 332, 5411, 10...
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); CREATE TABLE Project_Staff (staff_id VARCHAR, role_code VARCHAR, project_id VARCHAR); CREATE TABLE Staff_Roles (role_description VARCHAR, role_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2786, 834, 670, 287, 15, 7, 41, 23574, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 2786, 834, 134, 17, 4127, 41, 26416, 834, 23, 26, 584, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 3491, 15, 834, 221, 11830, 6, 332, 4416, 26416, 834, 23, 26, 21680, 10071, 834, 448, 32, 965, 6157, 332, 536, 3, 15355, 3162, 2786, 834, 134, 17, 4127, 6157, 332, 357, 9191, 332, 5411, 3491, 15, 834, 49...
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, document_description VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 834, 25160, 7, 41, 28244, 834, 6137, 834, 4978, 584, 4280, 28027, 6, 1708, 834, 221, 11830, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 4073, 1708, 686, 19, 3028, 28, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1708, 834, 6137, 834, 4978, 21680, 11167, 834, 25160, 7, 549, 17444, 427, 1708, 834, 221, 11830, 8729, 9914, 3, 31, 1570, 23, 10646, 1454, 31, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
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)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 41, 7662, 17, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 2691, 54, 80, 5334, 43, 44, 167, 58, 6792, 8, 5334, 3, 23, 26, 11, 381, 5, 1, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 5334, 834, 23, 26, 6, 2847, 17161, 599, 1935, 61, 21680, 11167, 7, 350, 4630, 6880, 272, 476, 5334, 834, 23, 26, 4674, 11300, 272, 476, 2847, 17161, 599, 1935, 61, 309, 25067, 8729, 12604, 209, 1, -100, -100, -100, ...
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, organisation_details VARCHAR); CREATE TABLE organisation_Types (organisation_type_description VARCHAR, organisation_type VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11033, 7, 41, 10832, 834, 6137, 584, 4280, 28027, 6, 5102, 834, 221, 5756, 7, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 5102, 834, 25160, 7, 41, 10832,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 10832, 834, 6137, 834, 221, 11830, 21680, 5102, 834, 25160, 7, 6157, 332, 536, 3, 15355, 3162, 11033, 7, 6157, 332, 357, 9191, 332, 5411, 10832, 834, 6137, 3274, 332, 4416, 10832, 834, 6137, 549, 17444, 427...
What are all the details of the organisations described as 'Sponsor'? Sort the result in an ascending order.
SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_type_description = 'Sponsor' ORDER BY organisation_details
CREATE TABLE organisation_Types (organisation_type VARCHAR, organisation_type_description VARCHAR); CREATE TABLE Organisations (organisation_type VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5102, 834, 25160, 7, 41, 10832, 834, 6137, 584, 4280, 28027, 6, 5102, 834, 6137, 834, 221, 11830, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 11033, 7, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 5102, 834, 221, 5756, 7, 21680, 11033, 7, 6157, 332, 536, 3, 15355, 3162, 5102, 834, 25160, 7, 6157, 332, 357, 9191, 332, 5411, 10832, 834, 6137, 3274, 332, 4416, 10832, 834, 6137, 549, 17444, 427, 332, 4416, 10832, ...
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)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2786, 834, 670, 287, 15, 7, 41, 670, 287, 15, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 20565, 6353, 33, 6126, 45, 66, 8, 1195, 58, 1, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 2786, 834, 670, 287, 15, 7, 549, 17444, 427, 6138, 834, 4978, 3274, 3, 31, 345, 9, 4669, 31, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
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, date_from VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2786, 834, 134, 17, 4127, 41, 3491, 15, 834, 4978, 584, 4280, 28027, 6, 833, 834, 7152, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 516, 871, 1279, 38, 2440, 42, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 2786, 834, 134, 17, 4127, 549, 17444, 427, 1075, 834, 4978, 3274, 3, 31, 22900, 31, 4674, 833, 834, 7152, 3, 2, 3, 31, 2294, 3914, 18083, 14962, 1902, 10, 5553, 10, 5062, 31, 1, ...
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)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2786, 834, 134, 17, 4127, 41, 5522, 834, 235, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 336, 833, 13, 8, 871, 3140, 8, 1195, 58, 1, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 833, 834, 235, 21680, 2786, 834, 134, 17, 4127, 4674, 11300, 272, 476, 833, 834, 235, 309, 25067, 8729, 12604, 209, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
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, project_id VARCHAR); CREATE TABLE Research_outcomes (outcome_description VARCHAR, outcome_code VARCHAR); CREATE TABLE Projects (project_id VARCHAR, project_details VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2786, 834, 670, 287, 15, 7, 41, 670, 287, 15, 834, 4978, 584, 4280, 28027, 6, 516, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 2200, 834, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 670, 287, 15, 834, 221, 11830, 21680, 2200, 834, 670, 287, 15, 7, 6157, 332, 536, 3, 15355, 3162, 2786, 834, 670, 287, 15, 7, 6157, 332, 357, 9191, 332, 5411, 670, 287, 15, 834, 4978, 3274, 332, 4416, ...
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); CREATE TABLE Projects (organisation_id VARCHAR, project_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2786, 834, 670, 287, 15, 7, 41, 23574, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 2786, 7, 41, 10832, 834, 23, 26, 584, 4280, 28027, 6, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 10832, 834, 23, 26, 6, 2847, 17161, 599, 1935, 61, 21680, 2786, 7, 6157, 332, 536, 3, 15355, 3162, 2786, 834, 670, 287, 15, 7, 6157, 332, 357, 9191, 332, 5411, 23574, 834, 23, 26, 3274, 332, 4416, 23574...