db_id
stringclasses
140 values
schema
listlengths
0
26
question
stringlengths
16
224
query
stringlengths
18
577
query_toks
listlengths
4
90
query_toks_no_value
listlengths
4
125
question_toks
listlengths
4
44
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
What is the id for the employee called Ebba?
SELECT employee_ID FROM Employees WHERE employee_name = "Ebba"
[ "SELECT", "employee_ID", "FROM", "Employees", "WHERE", "employee_name", "=", "``", "Ebba", "''" ]
[ "select", "employee_id", "from", "employees", "where", "employee_name", "=", "value" ]
[ "What", "is", "the", "id", "for", "the", "employee", "called", "Ebba", "?" ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
Show the id of the employee named Ebba.
SELECT employee_ID FROM Employees WHERE employee_name = "Ebba"
[ "SELECT", "employee_ID", "FROM", "Employees", "WHERE", "employee_name", "=", "``", "Ebba", "''" ]
[ "select", "employee_id", "from", "employees", "where", "employee_name", "=", "value" ]
[ "Show", "the", "id", "of", "the", "employee", "named", "Ebba", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
Show the names of all the employees with role "HR".
SELECT employee_name FROM Employees WHERE role_code = "HR"
[ "SELECT", "employee_name", "FROM", "Employees", "WHERE", "role_code", "=", "``", "HR", "''" ]
[ "select", "employee_name", "from", "employees", "where", "role_code", "=", "value" ]
[ "Show", "the", "names", "of", "all", "the", "employees", "with", "role", "``", "HR", "''", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
Which employees have the role with code "HR"? Find their names.
SELECT employee_name FROM Employees WHERE role_code = "HR"
[ "SELECT", "employee_name", "FROM", "Employees", "WHERE", "role_code", "=", "``", "HR", "''" ]
[ "select", "employee_name", "from", "employees", "where", "role_code", "=", "value" ]
[ "Which", "employees", "have", "the", "role", "with", "code", "``", "HR", "''", "?", "Find", "their", "names", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
Show all role codes and the number of employees in each role.
SELECT role_code , count(*) FROM Employees GROUP BY role_code
[ "SELECT", "role_code", ",", "count", "(", "*", ")", "FROM", "Employees", "GROUP", "BY", "role_code" ]
[ "select", "role_code", ",", "count", "(", "*", ")", "from", "employees", "group", "by", "role_code" ]
[ "Show", "all", "role", "codes", "and", "the", "number", "of", "employees", "in", "each", "role", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
What is the code of each role and the number of employees in each role?
SELECT role_code , count(*) FROM Employees GROUP BY role_code
[ "SELECT", "role_code", ",", "count", "(", "*", ")", "FROM", "Employees", "GROUP", "BY", "role_code" ]
[ "select", "role_code", ",", "count", "(", "*", ")", "from", "employees", "group", "by", "role_code" ]
[ "What", "is", "the", "code", "of", "each", "role", "and", "the", "number", "of", "employees", "in", "each", "role", "?" ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
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
[ "SELECT", "role_code", "FROM", "Employees", "GROUP", "BY", "role_code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "role_code", "from", "employees", "group", "by", "role_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "What", "is", "the", "role", "code", "with", "the", "largest", "number", "of", "employees", "?" ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
Find the code of the role that have the most employees.
SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) DESC LIMIT 1
[ "SELECT", "role_code", "FROM", "Employees", "GROUP", "BY", "role_code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "role_code", "from", "employees", "group", "by", "role_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "Find", "the", "code", "of", "the", "role", "that", "have", "the", "most", "employees", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
Show all role codes with at least 3 employees.
SELECT role_code FROM Employees GROUP BY role_code HAVING count(*) >= 3
[ "SELECT", "role_code", "FROM", "Employees", "GROUP", "BY", "role_code", "HAVING", "count", "(", "*", ")", ">", "=", "3" ]
[ "select", "role_code", "from", "employees", "group", "by", "role_code", "having", "count", "(", "*", ")", ">", "=", "value" ]
[ "Show", "all", "role", "codes", "with", "at", "least", "3", "employees", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
What are the roles with three or more employees? Give me the role codes.
SELECT role_code FROM Employees GROUP BY role_code HAVING count(*) >= 3
[ "SELECT", "role_code", "FROM", "Employees", "GROUP", "BY", "role_code", "HAVING", "count", "(", "*", ")", ">", "=", "3" ]
[ "select", "role_code", "from", "employees", "group", "by", "role_code", "having", "count", "(", "*", ")", ">", "=", "value" ]
[ "What", "are", "the", "roles", "with", "three", "or", "more", "employees", "?", "Give", "me", "the", "role", "codes", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
Show the role code with the least employees.
SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) ASC LIMIT 1
[ "SELECT", "role_code", "FROM", "Employees", "GROUP", "BY", "role_code", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1" ]
[ "select", "role_code", "from", "employees", "group", "by", "role_code", "order", "by", "count", "(", "*", ")", "asc", "limit", "value" ]
[ "Show", "the", "role", "code", "with", "the", "least", "employees", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
What is the role with the smallest number of employees? Find the role codes.
SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) ASC LIMIT 1
[ "SELECT", "role_code", "FROM", "Employees", "GROUP", "BY", "role_code", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1" ]
[ "select", "role_code", "from", "employees", "group", "by", "role_code", "order", "by", "count", "(", "*", ")", "asc", "limit", "value" ]
[ "What", "is", "the", "role", "with", "the", "smallest", "number", "of", "employees", "?", "Find", "the", "role", "codes", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
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"
[ "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", "''" ]
[ "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", "=", "value" ]
[ "What", "is", "the", "role", "name", "and", "role", "description", "for", "employee", "called", "Ebba", "?" ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
Show the name and description of the role played by the employee named 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"
[ "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", "''" ]
[ "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", "=", "value" ]
[ "Show", "the", "name", "and", "description", "of", "the", "role", "played", "by", "the", "employee", "named", "Ebba", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
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"
[ "SELECT", "T1.employee_name", "FROM", "Employees", "AS", "T1", "JOIN", "ROLES", "AS", "T2", "ON", "T1.role_code", "=", "T2.role_code", "WHERE", "T2.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", "=", "value" ]
[ "Show", "the", "names", "of", "employees", "with", "role", "name", "Editor", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
Find the names of all the employees whose the role name is "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"
[ "SELECT", "T1.employee_name", "FROM", "Employees", "AS", "T1", "JOIN", "ROLES", "AS", "T2", "ON", "T1.role_code", "=", "T2.role_code", "WHERE", "T2.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", "=", "value" ]
[ "Find", "the", "names", "of", "all", "the", "employees", "whose", "the", "role", "name", "is", "``", "Editor", "''", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
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"
[ "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", "''" ]
[ "select", "t1", ".", "employee_id", "from", "employees", "as", "t1", "join", "roles", "as", "t2", "on", "t1", ".", "role_code", "=", "t2", ".", "role_code", "where", "t2", ".", "role_name", "=", "value", "or", "t2", ".", "role_name", "=", "value" ]
[ "Show", "the", "employee", "ids", "for", "all", "employees", "with", "role", "name", "``", "Human", "Resource", "''", "or", "``", "Manager", "''", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
What are the employee ids of the employees whose role name is "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"
[ "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", "''" ]
[ "select", "t1", ".", "employee_id", "from", "employees", "as", "t1", "join", "roles", "as", "t2", "on", "t1", ".", "role_code", "=", "t2", ".", "role_code", "where", "t2", ".", "role_name", "=", "value", "or", "t2", ".", "role_name", "=", "value" ]
[ "What", "are", "the", "employee", "ids", "of", "the", "employees", "whose", "role", "name", "is", "``", "Human", "Resource", "''", "or", "``", "Manager", "''", "?" ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
What are the different location codes for documents?
SELECT DISTINCT location_code FROM Document_locations
[ "SELECT", "DISTINCT", "location_code", "FROM", "Document_locations" ]
[ "select", "distinct", "location_code", "from", "document_locations" ]
[ "What", "are", "the", "different", "location", "codes", "for", "documents", "?" ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
Give me all the distinct location codes for documents.
SELECT DISTINCT location_code FROM Document_locations
[ "SELECT", "DISTINCT", "location_code", "FROM", "Document_locations" ]
[ "select", "distinct", "location_code", "from", "document_locations" ]
[ "Give", "me", "all", "the", "distinct", "location", "codes", "for", "documents", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
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"
[ "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", "''" ]
[ "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", "=", "value" ]
[ "Show", "the", "location", "name", "for", "document", "``", "Robin", "CV", "''", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
What is the location name of the 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"
[ "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", "''" ]
[ "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", "=", "value" ]
[ "What", "is", "the", "location", "name", "of", "the", "document", "``", "Robin", "CV", "''", "?" ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
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
[ "SELECT", "location_code", ",", "date_in_location_from", ",", "date_in_locaton_to", "FROM", "Document_locations" ]
[ "select", "location_code", ",", "date_in_location_from", ",", "date_in_locaton_to", "from", "document_locations" ]
[ "Show", "the", "location", "code", ",", "the", "starting", "date", "and", "ending", "data", "in", "that", "location", "for", "all", "the", "documents", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
What are each document's location code, and starting date and ending data in that location?
SELECT location_code , date_in_location_from , date_in_locaton_to FROM Document_locations
[ "SELECT", "location_code", ",", "date_in_location_from", ",", "date_in_locaton_to", "FROM", "Document_locations" ]
[ "select", "location_code", ",", "date_in_location_from", ",", "date_in_locaton_to", "from", "document_locations" ]
[ "What", "are", "each", "document", "'s", "location", "code", ",", "and", "starting", "date", "and", "ending", "data", "in", "that", "location", "?" ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
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"
[ "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", "''" ]
[ "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", "=", "value" ]
[ "What", "is", "``", "the", "date", "in", "location", "from", "''", "and", "``", "the", "date", "in", "location", "to", "''", "for", "the", "document", "with", "name", "``", "Robin", "CV", "''", "?" ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
Find the starting date and ending data in location for the document named "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"
[ "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", "''" ]
[ "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", "=", "value" ]
[ "Find", "the", "starting", "date", "and", "ending", "data", "in", "location", "for", "the", "document", "named", "``", "Robin", "CV", "''", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
Show the location codes and the number of documents in each location.
SELECT location_code , count(*) FROM Document_locations GROUP BY location_code
[ "SELECT", "location_code", ",", "count", "(", "*", ")", "FROM", "Document_locations", "GROUP", "BY", "location_code" ]
[ "select", "location_code", ",", "count", "(", "*", ")", "from", "document_locations", "group", "by", "location_code" ]
[ "Show", "the", "location", "codes", "and", "the", "number", "of", "documents", "in", "each", "location", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
What is the code of each location and the number of documents in that location?
SELECT location_code , count(*) FROM Document_locations GROUP BY location_code
[ "SELECT", "location_code", ",", "count", "(", "*", ")", "FROM", "Document_locations", "GROUP", "BY", "location_code" ]
[ "select", "location_code", ",", "count", "(", "*", ")", "from", "document_locations", "group", "by", "location_code" ]
[ "What", "is", "the", "code", "of", "each", "location", "and", "the", "number", "of", "documents", "in", "that", "location", "?" ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
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
[ "SELECT", "location_code", "FROM", "Document_locations", "GROUP", "BY", "location_code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "location_code", "from", "document_locations", "group", "by", "location_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "What", "is", "the", "location", "code", "with", "the", "most", "documents", "?" ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
Find the code of the location with the largest number of documents.
SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY count(*) DESC LIMIT 1
[ "SELECT", "location_code", "FROM", "Document_locations", "GROUP", "BY", "location_code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "location_code", "from", "document_locations", "group", "by", "location_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "Find", "the", "code", "of", "the", "location", "with", "the", "largest", "number", "of", "documents", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
Show the location codes with at least 3 documents.
SELECT location_code FROM Document_locations GROUP BY location_code HAVING count(*) >= 3
[ "SELECT", "location_code", "FROM", "Document_locations", "GROUP", "BY", "location_code", "HAVING", "count", "(", "*", ")", ">", "=", "3" ]
[ "select", "location_code", "from", "document_locations", "group", "by", "location_code", "having", "count", "(", "*", ")", ">", "=", "value" ]
[ "Show", "the", "location", "codes", "with", "at", "least", "3", "documents", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
What are the codes of the locations with at least three documents?
SELECT location_code FROM Document_locations GROUP BY location_code HAVING count(*) >= 3
[ "SELECT", "location_code", "FROM", "Document_locations", "GROUP", "BY", "location_code", "HAVING", "count", "(", "*", ")", ">", "=", "3" ]
[ "select", "location_code", "from", "document_locations", "group", "by", "location_code", "having", "count", "(", "*", ")", ">", "=", "value" ]
[ "What", "are", "the", "codes", "of", "the", "locations", "with", "at", "least", "three", "documents", "?" ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
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(*) ASC LIMIT 1
[ "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", "(", "*", ")", "ASC", "LIMIT", "1" ]
[ "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", "(", "*", ")", "asc", "limit", "value" ]
[ "Show", "the", "location", "name", "and", "code", "with", "the", "least", "documents", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
What are the name and code of the location with the smallest number of 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(*) ASC LIMIT 1
[ "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", "(", "*", ")", "ASC", "LIMIT", "1" ]
[ "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", "(", "*", ")", "asc", "limit", "value" ]
[ "What", "are", "the", "name", "and", "code", "of", "the", "location", "with", "the", "smallest", "number", "of", "documents", "?" ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
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;
[ "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", ";" ]
[ "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" ]
[ "What", "are", "the", "names", "of", "the", "employees", "who", "authorised", "the", "destruction", "and", "the", "employees", "who", "destroyed", "the", "corresponding", "documents", "?" ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
List the names of the employees who authorized the destruction of documents 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;
[ "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", ";" ]
[ "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" ]
[ "List", "the", "names", "of", "the", "employees", "who", "authorized", "the", "destruction", "of", "documents", "and", "the", "employees", "who", "destroyed", "the", "corresponding", "documents", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
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
[ "SELECT", "Destruction_Authorised_by_Employee_ID", ",", "count", "(", "*", ")", "FROM", "Documents_to_be_destroyed", "GROUP", "BY", "Destruction_Authorised_by_Employee_ID" ]
[ "select", "destruction_authorised_by_employee_id", ",", "count", "(", "*", ")", "from", "documents_to_be_destroyed", "group", "by", "destruction_authorised_by_employee_id" ]
[ "Show", "the", "id", "of", "each", "employee", "and", "the", "number", "of", "document", "destruction", "authorised", "by", "that", "employee", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
What are 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
[ "SELECT", "Destruction_Authorised_by_Employee_ID", ",", "count", "(", "*", ")", "FROM", "Documents_to_be_destroyed", "GROUP", "BY", "Destruction_Authorised_by_Employee_ID" ]
[ "select", "destruction_authorised_by_employee_id", ",", "count", "(", "*", ")", "from", "documents_to_be_destroyed", "group", "by", "destruction_authorised_by_employee_id" ]
[ "What", "are", "the", "id", "of", "each", "employee", "and", "the", "number", "of", "document", "destruction", "authorised", "by", "that", "employee", "?" ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
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
[ "SELECT", "Destroyed_by_Employee_ID", ",", "count", "(", "*", ")", "FROM", "Documents_to_be_destroyed", "GROUP", "BY", "Destroyed_by_Employee_ID" ]
[ "select", "destroyed_by_employee_id", ",", "count", "(", "*", ")", "from", "documents_to_be_destroyed", "group", "by", "destroyed_by_employee_id" ]
[ "Show", "the", "employee", "ids", "and", "the", "number", "of", "documents", "destroyed", "by", "each", "employee", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
What are the id of each employee and the number of document destroyed by that employee?
SELECT Destroyed_by_Employee_ID , count(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID
[ "SELECT", "Destroyed_by_Employee_ID", ",", "count", "(", "*", ")", "FROM", "Documents_to_be_destroyed", "GROUP", "BY", "Destroyed_by_Employee_ID" ]
[ "select", "destroyed_by_employee_id", ",", "count", "(", "*", ")", "from", "documents_to_be_destroyed", "group", "by", "destroyed_by_employee_id" ]
[ "What", "are", "the", "id", "of", "each", "employee", "and", "the", "number", "of", "document", "destroyed", "by", "that", "employee", "?" ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
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
[ "SELECT", "employee_id", "FROM", "Employees", "EXCEPT", "SELECT", "Destruction_Authorised_by_Employee_ID", "FROM", "Documents_to_be_destroyed" ]
[ "select", "employee_id", "from", "employees", "except", "select", "destruction_authorised_by_employee_id", "from", "documents_to_be_destroyed" ]
[ "Show", "the", "ids", "of", "the", "employees", "who", "do", "n't", "authorize", "destruction", "for", "any", "document", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
Which employees do not authorize destruction for any document? Give me their employee ids.
SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
[ "SELECT", "employee_id", "FROM", "Employees", "EXCEPT", "SELECT", "Destruction_Authorised_by_Employee_ID", "FROM", "Documents_to_be_destroyed" ]
[ "select", "employee_id", "from", "employees", "except", "select", "destruction_authorised_by_employee_id", "from", "documents_to_be_destroyed" ]
[ "Which", "employees", "do", "not", "authorize", "destruction", "for", "any", "document", "?", "Give", "me", "their", "employee", "ids", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
Show the ids of all employees who have authorized destruction.
SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
[ "SELECT", "DISTINCT", "Destruction_Authorised_by_Employee_ID", "FROM", "Documents_to_be_destroyed" ]
[ "select", "distinct", "destruction_authorised_by_employee_id", "from", "documents_to_be_destroyed" ]
[ "Show", "the", "ids", "of", "all", "employees", "who", "have", "authorized", "destruction", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
What are the ids of all the employees who authorize document destruction?
SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
[ "SELECT", "DISTINCT", "Destruction_Authorised_by_Employee_ID", "FROM", "Documents_to_be_destroyed" ]
[ "select", "distinct", "destruction_authorised_by_employee_id", "from", "documents_to_be_destroyed" ]
[ "What", "are", "the", "ids", "of", "all", "the", "employees", "who", "authorize", "document", "destruction", "?" ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
Show the ids of all employees who have destroyed a document.
SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed
[ "SELECT", "DISTINCT", "Destroyed_by_Employee_ID", "FROM", "Documents_to_be_destroyed" ]
[ "select", "distinct", "destroyed_by_employee_id", "from", "documents_to_be_destroyed" ]
[ "Show", "the", "ids", "of", "all", "employees", "who", "have", "destroyed", "a", "document", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
What are the ids of all the employees who have destroyed documents?
SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed
[ "SELECT", "DISTINCT", "Destroyed_by_Employee_ID", "FROM", "Documents_to_be_destroyed" ]
[ "select", "distinct", "destroyed_by_employee_id", "from", "documents_to_be_destroyed" ]
[ "What", "are", "the", "ids", "of", "all", "the", "employees", "who", "have", "destroyed", "documents", "?" ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
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
[ "SELECT", "employee_id", "FROM", "Employees", "EXCEPT", "SELECT", "Destroyed_by_Employee_ID", "FROM", "Documents_to_be_destroyed" ]
[ "select", "employee_id", "from", "employees", "except", "select", "destroyed_by_employee_id", "from", "documents_to_be_destroyed" ]
[ "Show", "the", "ids", "of", "all", "employees", "who", "do", "n't", "destroy", "any", "document", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
Which employees do not destroy any document? Find their employee ids.
SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed
[ "SELECT", "employee_id", "FROM", "Employees", "EXCEPT", "SELECT", "Destroyed_by_Employee_ID", "FROM", "Documents_to_be_destroyed" ]
[ "select", "employee_id", "from", "employees", "except", "select", "destroyed_by_employee_id", "from", "documents_to_be_destroyed" ]
[ "Which", "employees", "do", "not", "destroy", "any", "document", "?", "Find", "their", "employee", "ids", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
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
[ "SELECT", "Destroyed_by_Employee_ID", "FROM", "Documents_to_be_destroyed", "UNION", "SELECT", "Destruction_Authorised_by_Employee_ID", "FROM", "Documents_to_be_destroyed" ]
[ "select", "destroyed_by_employee_id", "from", "documents_to_be_destroyed", "union", "select", "destruction_authorised_by_employee_id", "from", "documents_to_be_destroyed" ]
[ "Show", "the", "ids", "of", "all", "employees", "who", "have", "either", "destroyed", "a", "document", "or", "made", "an", "authorization", "to", "do", "this", "." ]
cre_Doc_Tracking_DB
[ "CREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Type_Name VARCHAR(255) NOT NULL,\nDocument_Type_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Document_Type_Code)\n);", "CREATE TABLE Ref_Calendar (\nCalendar_Date DATETIME NOT NULL,\nDay_Number INTEGER,\nPRIMARY KEY (Calendar_Date)\n);", "CREATE TABLE Ref_Locations (\nLocation_Code CHAR(15) NOT NULL,\nLocation_Name VARCHAR(255) NOT NULL,\nLocation_Description VARCHAR(255) NOT NULL,\nPRIMARY KEY (Location_Code)\n);", "CREATE TABLE Roles (\nRole_Code CHAR(15) NOT NULL,\nRole_Name VARCHAR(255),\nRole_Description VARCHAR(255),\nPRIMARY KEY (Role_Code)\n);", "CREATE TABLE All_Documents (\nDocument_ID INTEGER NOT NULL,\nDate_Stored DATETIME,\nDocument_Type_Code CHAR(15) NOT NULL,\nDocument_Name CHAR(255),\nDocument_Description CHAR(255),\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\n);", "CREATE TABLE Employees (\nEmployee_ID INTEGER NOT NULL,\nRole_Code CHAR(15) NOT NULL,\nEmployee_Name VARCHAR(255),\nGender_MFU CHAR(1) NOT NULL,\nDate_of_Birth DATETIME NOT NULL,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Employee_ID),\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\n);", "CREATE TABLE Document_Locations (\nDocument_ID INTEGER NOT NULL,\nLocation_Code CHAR(15) NOT NULL,\nDate_in_Location_From DATETIME NOT NULL,\nDate_in_Locaton_To DATETIME,\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);", "CREATE TABLE Documents_to_be_Destroyed (\nDocument_ID INTEGER NOT NULL,\nDestruction_Authorised_by_Employee_ID INTEGER,\nDestroyed_by_Employee_ID INTEGER,\nPlanned_Destruction_Date DATETIME,\nActual_Destruction_Date DATETIME,\nOther_Details VARCHAR(255),\nPRIMARY KEY (Document_ID),\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\n);" ]
Which employees have either destroyed a document or made an authorization to do so? Return their employee ids.
SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
[ "SELECT", "Destroyed_by_Employee_ID", "FROM", "Documents_to_be_destroyed", "UNION", "SELECT", "Destruction_Authorised_by_Employee_ID", "FROM", "Documents_to_be_destroyed" ]
[ "select", "destroyed_by_employee_id", "from", "documents_to_be_destroyed", "union", "select", "destruction_authorised_by_employee_id", "from", "documents_to_be_destroyed" ]
[ "Which", "employees", "have", "either", "destroyed", "a", "document", "or", "made", "an", "authorization", "to", "do", "so", "?", "Return", "their", "employee", "ids", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
How many clubs are there?
SELECT count(*) FROM club
[ "SELECT", "count", "(", "*", ")", "FROM", "club" ]
[ "select", "count", "(", "*", ")", "from", "club" ]
[ "How", "many", "clubs", "are", "there", "?" ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
Count the total number of clubs.
SELECT count(*) FROM club
[ "SELECT", "count", "(", "*", ")", "FROM", "club" ]
[ "select", "count", "(", "*", ")", "from", "club" ]
[ "Count", "the", "total", "number", "of", "clubs", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
What are the names of all clubs?
SELECT clubname FROM club
[ "SELECT", "clubname", "FROM", "club" ]
[ "select", "clubname", "from", "club" ]
[ "What", "are", "the", "names", "of", "all", "clubs", "?" ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
Give me the name of each club.
SELECT clubname FROM club
[ "SELECT", "clubname", "FROM", "club" ]
[ "select", "clubname", "from", "club" ]
[ "Give", "me", "the", "name", "of", "each", "club", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
How many students are there?
SELECT count(*) FROM student
[ "SELECT", "count", "(", "*", ")", "FROM", "student" ]
[ "select", "count", "(", "*", ")", "from", "student" ]
[ "How", "many", "students", "are", "there", "?" ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
Count the total number of students.
SELECT count(*) FROM student
[ "SELECT", "count", "(", "*", ")", "FROM", "student" ]
[ "select", "count", "(", "*", ")", "from", "student" ]
[ "Count", "the", "total", "number", "of", "students", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
What are the first names of all the students?
SELECT DISTINCT fname FROM student
[ "SELECT", "DISTINCT", "fname", "FROM", "student" ]
[ "select", "distinct", "fname", "from", "student" ]
[ "What", "are", "the", "first", "names", "of", "all", "the", "students", "?" ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
Find each student's first name.
SELECT DISTINCT fname FROM student
[ "SELECT", "DISTINCT", "fname", "FROM", "student" ]
[ "select", "distinct", "fname", "from", "student" ]
[ "Find", "each", "student", "'s", "first", "name", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
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"
[ "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", "''" ]
[ "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", "=", "value" ]
[ "Find", "the", "last", "names", "of", "the", "members", "of", "the", "club", "``", "Bootup", "Baltimore", "''", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
Who are the members of the club named "Bootup Baltimore"? Give me their last names.
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"
[ "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", "''" ]
[ "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", "=", "value" ]
[ "Who", "are", "the", "members", "of", "the", "club", "named", "``", "Bootup", "Baltimore", "''", "?", "Give", "me", "their", "last", "names", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
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"
[ "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", "''" ]
[ "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", "=", "value" ]
[ "Who", "are", "the", "members", "of", "the", "club", "named", "``", "Hopkins", "Student", "Enterprises", "''", "?", "Show", "the", "last", "name", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
Return the last name for the members of the club named "Hopkins Student Enterprises".
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"
[ "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", "''" ]
[ "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", "=", "value" ]
[ "Return", "the", "last", "name", "for", "the", "members", "of", "the", "club", "named", "``", "Hopkins", "Student", "Enterprises", "''", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
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"
[ "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", "''" ]
[ "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", "=", "value" ]
[ "How", "many", "members", "does", "the", "club", "``", "Tennis", "Club", "''", "has", "?" ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
Count the members of the club "Tennis Club".
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"
[ "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", "''" ]
[ "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", "=", "value" ]
[ "Count", "the", "members", "of", "the", "club", "``", "Tennis", "Club", "''", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
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"
[ "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", "''" ]
[ "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", "=", "value" ]
[ "Find", "the", "number", "of", "members", "of", "club", "``", "Pen", "and", "Paper", "Gaming", "''", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
How many people have membership in the 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"
[ "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", "''" ]
[ "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", "=", "value" ]
[ "How", "many", "people", "have", "membership", "in", "the", "club", "``", "Pen", "and", "Paper", "Gaming", "''", "?" ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
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"
[ "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", "''" ]
[ "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", "=", "value", "and", "t3", ".", "lname", "=", "value" ]
[ "How", "many", "clubs", "does", "``", "Linda", "Smith", "''", "belong", "to", "?" ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
How many clubs does "Linda Smith" have membership for?
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"
[ "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", "''" ]
[ "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", "=", "value", "and", "t3", ".", "lname", "=", "value" ]
[ "How", "many", "clubs", "does", "``", "Linda", "Smith", "''", "have", "membership", "for", "?" ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
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"
[ "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", "''" ]
[ "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", "=", "value", "and", "t3", ".", "lname", "=", "value" ]
[ "Find", "the", "number", "of", "clubs", "where", "``", "Tracy", "Kim", "''", "is", "a", "member", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
For how many clubs is "Tracy Kim" 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"
[ "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", "''" ]
[ "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", "=", "value", "and", "t3", ".", "lname", "=", "value" ]
[ "For", "how", "many", "clubs", "is", "``", "Tracy", "Kim", "''", "a", "member", "?" ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
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"
[ "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", "''" ]
[ "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", "=", "value", "and", "t3", ".", "sex", "=", "value" ]
[ "Find", "all", "the", "female", "members", "of", "club", "``", "Bootup", "Baltimore", "''", ".", "Show", "the", "first", "name", "and", "last", "name", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
Give me the first name and last name for all the female members 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 t3.sex = "F"
[ "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", "''" ]
[ "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", "=", "value", "and", "t3", ".", "sex", "=", "value" ]
[ "Give", "me", "the", "first", "name", "and", "last", "name", "for", "all", "the", "female", "members", "of", "the", "club", "``", "Bootup", "Baltimore", "''", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
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"
[ "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", "''" ]
[ "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", "=", "value", "and", "t3", ".", "sex", "=", "value" ]
[ "Find", "all", "the", "male", "members", "of", "club", "``", "Hopkins", "Student", "Enterprises", "''", ".", "Show", "the", "first", "name", "and", "last", "name", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
What are the first name and last name of each male member in club "Hopkins Student Enterprises"?
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"
[ "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", "''" ]
[ "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", "=", "value", "and", "t3", ".", "sex", "=", "value" ]
[ "What", "are", "the", "first", "name", "and", "last", "name", "of", "each", "male", "member", "in", "club", "``", "Hopkins", "Student", "Enterprises", "''", "?" ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
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"
[ "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", "''" ]
[ "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", "=", "value", "and", "t3", ".", "major", "=", "value" ]
[ "Find", "all", "members", "of", "``", "Bootup", "Baltimore", "''", "whose", "major", "is", "``", "600", "''", ".", "Show", "the", "first", "name", "and", "last", "name", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
Which members of "Bootup Baltimore" major in "600"? Give me their first names and last names.
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"
[ "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", "''" ]
[ "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", "=", "value", "and", "t3", ".", "major", "=", "value" ]
[ "Which", "members", "of", "``", "Bootup", "Baltimore", "''", "major", "in", "``", "600", "''", "?", "Give", "me", "their", "first", "names", "and", "last", "names", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
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
[ "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" ]
[ "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", "=", "value", "group", "by", "t1", ".", "clubname", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "Which", "club", "has", "the", "most", "members", "majoring", "in", "``", "600", "''", "?" ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
Find the club which has the largest number of 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
[ "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" ]
[ "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", "=", "value", "group", "by", "t1", ".", "clubname", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "Find", "the", "club", "which", "has", "the", "largest", "number", "of", "members", "majoring", "in", "``", "600", "''", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
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
[ "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" ]
[ "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", "=", "value", "group", "by", "t1", ".", "clubname", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "Find", "the", "name", "of", "the", "club", "that", "has", "the", "most", "female", "students", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
Which club has the most female students as their members? Give me the name of the club.
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
[ "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" ]
[ "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", "=", "value", "group", "by", "t1", ".", "clubname", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "Which", "club", "has", "the", "most", "female", "students", "as", "their", "members", "?", "Give", "me", "the", "name", "of", "the", "club", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
What is the description of the club named "Tennis Club"?
SELECT clubdesc FROM club WHERE clubname = "Tennis Club"
[ "SELECT", "clubdesc", "FROM", "club", "WHERE", "clubname", "=", "``", "Tennis", "Club", "''" ]
[ "select", "clubdesc", "from", "club", "where", "clubname", "=", "value" ]
[ "What", "is", "the", "description", "of", "the", "club", "named", "``", "Tennis", "Club", "''", "?" ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
Find the description of the club called "Tennis Club".
SELECT clubdesc FROM club WHERE clubname = "Tennis Club"
[ "SELECT", "clubdesc", "FROM", "club", "WHERE", "clubname", "=", "``", "Tennis", "Club", "''" ]
[ "select", "clubdesc", "from", "club", "where", "clubname", "=", "value" ]
[ "Find", "the", "description", "of", "the", "club", "called", "``", "Tennis", "Club", "''", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
Find the description of the club "Pen and Paper Gaming".
SELECT clubdesc FROM club WHERE clubname = "Pen and Paper Gaming"
[ "SELECT", "clubdesc", "FROM", "club", "WHERE", "clubname", "=", "``", "Pen", "and", "Paper", "Gaming", "''" ]
[ "select", "clubdesc", "from", "club", "where", "clubname", "=", "value" ]
[ "Find", "the", "description", "of", "the", "club", "``", "Pen", "and", "Paper", "Gaming", "''", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
What is the description of the club "Pen and Paper Gaming"?
SELECT clubdesc FROM club WHERE clubname = "Pen and Paper Gaming"
[ "SELECT", "clubdesc", "FROM", "club", "WHERE", "clubname", "=", "``", "Pen", "and", "Paper", "Gaming", "''" ]
[ "select", "clubdesc", "from", "club", "where", "clubname", "=", "value" ]
[ "What", "is", "the", "description", "of", "the", "club", "``", "Pen", "and", "Paper", "Gaming", "''", "?" ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
What is the location of the club named "Tennis Club"?
SELECT clublocation FROM club WHERE clubname = "Tennis Club"
[ "SELECT", "clublocation", "FROM", "club", "WHERE", "clubname", "=", "``", "Tennis", "Club", "''" ]
[ "select", "clublocation", "from", "club", "where", "clubname", "=", "value" ]
[ "What", "is", "the", "location", "of", "the", "club", "named", "``", "Tennis", "Club", "''", "?" ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
Where us the club named "Tennis Club" located?
SELECT clublocation FROM club WHERE clubname = "Tennis Club"
[ "SELECT", "clublocation", "FROM", "club", "WHERE", "clubname", "=", "``", "Tennis", "Club", "''" ]
[ "select", "clublocation", "from", "club", "where", "clubname", "=", "value" ]
[ "Where", "us", "the", "club", "named", "``", "Tennis", "Club", "''", "located", "?" ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
Find the location of the club "Pen and Paper Gaming".
SELECT clublocation FROM club WHERE clubname = "Pen and Paper Gaming"
[ "SELECT", "clublocation", "FROM", "club", "WHERE", "clubname", "=", "``", "Pen", "and", "Paper", "Gaming", "''" ]
[ "select", "clublocation", "from", "club", "where", "clubname", "=", "value" ]
[ "Find", "the", "location", "of", "the", "club", "``", "Pen", "and", "Paper", "Gaming", "''", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
Where is the club "Pen and Paper Gaming" located?
SELECT clublocation FROM club WHERE clubname = "Pen and Paper Gaming"
[ "SELECT", "clublocation", "FROM", "club", "WHERE", "clubname", "=", "``", "Pen", "and", "Paper", "Gaming", "''" ]
[ "select", "clublocation", "from", "club", "where", "clubname", "=", "value" ]
[ "Where", "is", "the", "club", "``", "Pen", "and", "Paper", "Gaming", "''", "located", "?" ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
Where is the club "Hopkins Student Enterprises" located?
SELECT clublocation FROM club WHERE clubname = "Hopkins Student Enterprises"
[ "SELECT", "clublocation", "FROM", "club", "WHERE", "clubname", "=", "``", "Hopkins", "Student", "Enterprises", "''" ]
[ "select", "clublocation", "from", "club", "where", "clubname", "=", "value" ]
[ "Where", "is", "the", "club", "``", "Hopkins", "Student", "Enterprises", "''", "located", "?" ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
Tell me the location of the club "Hopkins Student Enterprises".
SELECT clublocation FROM club WHERE clubname = "Hopkins Student Enterprises"
[ "SELECT", "clublocation", "FROM", "club", "WHERE", "clubname", "=", "``", "Hopkins", "Student", "Enterprises", "''" ]
[ "select", "clublocation", "from", "club", "where", "clubname", "=", "value" ]
[ "Tell", "me", "the", "location", "of", "the", "club", "``", "Hopkins", "Student", "Enterprises", "''", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
Find the name of all the clubs at "AKW".
SELECT clubname FROM club WHERE clublocation = "AKW"
[ "SELECT", "clubname", "FROM", "club", "WHERE", "clublocation", "=", "``", "AKW", "''" ]
[ "select", "clubname", "from", "club", "where", "clublocation", "=", "value" ]
[ "Find", "the", "name", "of", "all", "the", "clubs", "at", "``", "AKW", "''", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
Which clubs are located at "AKW"? Return the club names.
SELECT clubname FROM club WHERE clublocation = "AKW"
[ "SELECT", "clubname", "FROM", "club", "WHERE", "clublocation", "=", "``", "AKW", "''" ]
[ "select", "clubname", "from", "club", "where", "clublocation", "=", "value" ]
[ "Which", "clubs", "are", "located", "at", "``", "AKW", "''", "?", "Return", "the", "club", "names", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
How many clubs are located at "HHH"?
SELECT count(*) FROM club WHERE clublocation = "HHH"
[ "SELECT", "count", "(", "*", ")", "FROM", "club", "WHERE", "clublocation", "=", "``", "HHH", "''" ]
[ "select", "count", "(", "*", ")", "from", "club", "where", "clublocation", "=", "value" ]
[ "How", "many", "clubs", "are", "located", "at", "``", "HHH", "''", "?" ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
Count the number of clubs located at "HHH".
SELECT count(*) FROM club WHERE clublocation = "HHH"
[ "SELECT", "count", "(", "*", ")", "FROM", "club", "WHERE", "clublocation", "=", "``", "HHH", "''" ]
[ "select", "count", "(", "*", ")", "from", "club", "where", "clublocation", "=", "value" ]
[ "Count", "the", "number", "of", "clubs", "located", "at", "``", "HHH", "''", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
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"
[ "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", "''" ]
[ "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", "=", "value", "and", "t2", ".", "position", "=", "value" ]
[ "What", "are", "the", "first", "and", "last", "name", "of", "the", "president", "of", "the", "club", "``", "Bootup", "Baltimore", "''", "?" ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
Who is the president of the club "Bootup Baltimore"? Give me the first 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 t2.position = "President"
[ "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", "''" ]
[ "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", "=", "value", "and", "t2", ".", "position", "=", "value" ]
[ "Who", "is", "the", "president", "of", "the", "club", "``", "Bootup", "Baltimore", "''", "?", "Give", "me", "the", "first", "and", "last", "name", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
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"
[ "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", "''" ]
[ "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", "=", "value", "and", "t2", ".", "position", "=", "value" ]
[ "Who", "is", "the", "``", "CTO", "''", "of", "club", "``", "Hopkins", "Student", "Enterprises", "''", "?", "Show", "the", "first", "name", "and", "last", "name", "." ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
Find the first name and last name for the "CTO" of the club "Hopkins Student Enterprises"?
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"
[ "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", "''" ]
[ "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", "=", "value", "and", "t2", ".", "position", "=", "value" ]
[ "Find", "the", "first", "name", "and", "last", "name", "for", "the", "``", "CTO", "''", "of", "the", "club", "``", "Hopkins", "Student", "Enterprises", "''", "?" ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
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"
[ "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", "''" ]
[ "select", "count", "(", "distinct", "t2", ".", "position", ")", "from", "club", "as", "t1", "join", "member_of_club", "as", "t2", "on", "t1", ".", "clubid", "=", "t2", ".", "clubid", "where", "t1", ".", "clubname", "=", "value" ]
[ "How", "many", "different", "roles", "are", "there", "in", "the", "club", "``", "Bootup", "Baltimore", "''", "?" ]
club_1
[ "create table Student (\n StuID INTEGER PRIMARY KEY,\n LName VARCHAR(12),\n Fname VARCHAR(12),\n Age INTEGER,\n Sex VARCHAR(1),\n Major INTEGER,\n Advisor INTEGER,\n city_code VARCHAR(3)\n );", "create table Club (\n ClubID INTEGER PRIMARY KEY,\n ClubName VARCHAR(40),\n ClubDesc VARCHAR(1024),\n ClubLocation VARCHAR(40)\n);", "create table Member_of_club (\n StuID INTEGER,\n ClubID INTEGER,\n Position VARCHAR(40),\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\n);" ]
Count the number of different positions 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"
[ "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", "''" ]
[ "select", "count", "(", "distinct", "t2", ".", "position", ")", "from", "club", "as", "t1", "join", "member_of_club", "as", "t2", "on", "t1", ".", "clubid", "=", "t2", ".", "clubid", "where", "t1", ".", "clubname", "=", "value" ]
[ "Count", "the", "number", "of", "different", "positions", "in", "the", "club", "``", "Bootup", "Baltimore", "''", "." ]