input
stringlengths
191
7.13k
output
stringlengths
19
578
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: What is the id for the employee called Ebba? [/INST]
SELECT employee_ID FROM Employees WHERE employee_name = "Ebba";
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Show the id of the employee named Ebba. [/INST]
SELECT employee_ID FROM Employees WHERE employee_name = "Ebba";
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Show the names of all the employees with role "HR". [/INST]
SELECT employee_name FROM Employees WHERE role_code = "HR";
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Which employees have the role with code "HR"? Find their names. [/INST]
SELECT employee_name FROM Employees WHERE role_code = "HR";
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Show all role codes and the number of employees in each role. [/INST]
SELECT role_code , count(*) FROM Employees GROUP BY role_code;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: What is the code of each role and the number of employees in each role? [/INST]
SELECT role_code , count(*) FROM Employees GROUP BY role_code;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: What is the role code with the largest number of employees? [/INST]
SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) DESC LIMIT 1;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Find the code of the role that have the most employees. [/INST]
SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) DESC LIMIT 1;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Show all role codes with at least 3 employees. [/INST]
SELECT role_code FROM Employees GROUP BY role_code HAVING count(*) >= 3;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: What are the roles with three or more employees? Give me the role codes. [/INST]
SELECT role_code FROM Employees GROUP BY role_code HAVING count(*) >= 3;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Show the role code with the least employees. [/INST]
SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) ASC LIMIT 1;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: What is the role with the smallest number of employees? Find the role codes. [/INST]
SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) ASC LIMIT 1;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: What is the role name and role description for employee called Ebba? [/INST]
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";
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Show the name and description of the role played by the employee named Ebba. [/INST]
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";
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Show the names of employees with role name Editor. [/INST]
SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = "Editor";
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Find the names of all the employees whose the role name is "Editor". [/INST]
SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = "Editor";
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Show the employee ids for all employees with role name "Human Resource" or "Manager". [/INST]
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";
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: What are the employee ids of the employees whose role name is "Human Resource" or "Manager"? [/INST]
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";
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: What are the different location codes for documents? [/INST]
SELECT DISTINCT location_code FROM Document_locations;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Give me all the distinct location codes for documents. [/INST]
SELECT DISTINCT location_code FROM Document_locations;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Show the location name for document "Robin CV". [/INST]
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";
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: What is the location name of the document "Robin CV"? [/INST]
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";
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Show the location code, the starting date and ending data in that location for all the documents. [/INST]
SELECT location_code , date_in_location_from , date_in_locaton_to FROM Document_locations;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: What are each document's location code, and starting date and ending data in that location? [/INST]
SELECT location_code , date_in_location_from , date_in_locaton_to FROM Document_locations;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: What is "the date in location from" and "the date in location to" for the document with name "Robin CV"? [/INST]
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";
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Find the starting date and ending data in location for the document named "Robin CV". [/INST]
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";
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Show the location codes and the number of documents in each location. [/INST]
SELECT location_code , count(*) FROM Document_locations GROUP BY location_code;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: What is the code of each location and the number of documents in that location? [/INST]
SELECT location_code , count(*) FROM Document_locations GROUP BY location_code;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: What is the location code with the most documents? [/INST]
SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY count(*) DESC LIMIT 1;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Find the code of the location with the largest number of documents. [/INST]
SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY count(*) DESC LIMIT 1;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Show the location codes with at least 3 documents. [/INST]
SELECT location_code FROM Document_locations GROUP BY location_code HAVING count(*) >= 3;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: What are the codes of the locations with at least three documents? [/INST]
SELECT location_code FROM Document_locations GROUP BY location_code HAVING count(*) >= 3;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Show the location name and code with the least documents. [/INST]
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;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: What are the name and code of the location with the smallest number of documents? [/INST]
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;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: What are the names of the employees who authorised the destruction and the employees who destroyed the corresponding documents? [/INST]
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;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: List the names of the employees who authorized the destruction of documents and the employees who destroyed the corresponding documents. [/INST]
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;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Show the id of each employee and the number of document destruction authorised by that employee. [/INST]
SELECT Destruction_Authorised_by_Employee_ID , count(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: What are the id of each employee and the number of document destruction authorised by that employee? [/INST]
SELECT Destruction_Authorised_by_Employee_ID , count(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Show the employee ids and the number of documents destroyed by each employee. [/INST]
SELECT Destroyed_by_Employee_ID , count(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: What are the id of each employee and the number of document destroyed by that employee? [/INST]
SELECT Destroyed_by_Employee_ID , count(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Show the ids of the employees who don't authorize destruction for any document. [/INST]
SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Which employees do not authorize destruction for any document? Give me their employee ids. [/INST]
SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Show the ids of all employees who have authorized destruction. [/INST]
SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: What are the ids of all the employees who authorize document destruction? [/INST]
SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Show the ids of all employees who have destroyed a document. [/INST]
SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: What are the ids of all the employees who have destroyed documents? [/INST]
SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Show the ids of all employees who don't destroy any document. [/INST]
SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Which employees do not destroy any document? Find their employee ids. [/INST]
SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Show the ids of all employees who have either destroyed a document or made an authorization to do this. [/INST]
SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed;
Tables: Ref_Document_Types, Ref_Calendar, Ref_Locations, Roles, All_Documents, Employees, Document_Locations, Documents_to_be_Destroyed Columns: Ref_Document_Types.Document_Type_Code, Ref_Document_Types.Document_Type_Name, Ref_Document_Types.Document_Type_Description, Ref_Calendar.Calendar_Date, Ref_Calendar.Day_Number, Ref_Locations.Location_Code, Ref_Locations.Location_Name, Ref_Locations.Location_Description, Roles.Role_Code, Roles.Role_Name, Roles.Role_Description, All_Documents.Document_ID, All_Documents.Date_Stored, All_Documents.Document_Type_Code, All_Documents.Document_Name, All_Documents.Document_Description, All_Documents.Other_Details, Employees.Employee_ID, Employees.Role_Code, Employees.Employee_Name, Employees.Gender_MFU, Employees.Date_of_Birth, Employees.Other_Details, Document_Locations.Document_ID, Document_Locations.Location_Code, Document_Locations.Date_in_Location_From, Document_Locations.Date_in_Locaton_To, Documents_to_be_Destroyed.Document_ID, Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID, Documents_to_be_Destroyed.Destroyed_by_Employee_ID, Documents_to_be_Destroyed.Planned_Destruction_Date, Documents_to_be_Destroyed.Actual_Destruction_Date, Documents_to_be_Destroyed.Other_Details Question: Which employees have either destroyed a document or made an authorization to do so? Return their employee ids. [/INST]
SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed;
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: How many clubs are there? [/INST]
SELECT count(*) FROM club;
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Count the total number of clubs. [/INST]
SELECT count(*) FROM club;
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: What are the names of all clubs? [/INST]
SELECT clubname FROM club;
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Give me the name of each club. [/INST]
SELECT clubname FROM club;
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: How many students are there? [/INST]
SELECT count(*) FROM student;
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Count the total number of students. [/INST]
SELECT count(*) FROM student;
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: What are the first names of all the students? [/INST]
SELECT DISTINCT fname FROM student;
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Find each student's first name. [/INST]
SELECT DISTINCT fname FROM student;
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Find the last names of the members of the club "Bootup Baltimore". [/INST]
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";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Who are the members of the club named "Bootup Baltimore"? Give me their last names. [/INST]
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";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Who are the members of the club named "Hopkins Student Enterprises"? Show the last name. [/INST]
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";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Return the last name for the members of the club named "Hopkins Student Enterprises". [/INST]
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";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: How many members does the club "Tennis Club" has? [/INST]
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";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Count the members of the club "Tennis Club". [/INST]
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";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Find the number of members of club "Pen and Paper Gaming". [/INST]
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";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: How many people have membership in the club "Pen and Paper Gaming"? [/INST]
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";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: How many clubs does "Linda Smith" belong to? [/INST]
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";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: How many clubs does "Linda Smith" have membership for? [/INST]
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";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Find the number of clubs where "Tracy Kim" is a member. [/INST]
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";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: For how many clubs is "Tracy Kim" a member? [/INST]
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";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Find all the female members of club "Bootup Baltimore". Show the first name and last name. [/INST]
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";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Give me the first name and last name for all the female members of the club "Bootup Baltimore". [/INST]
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";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Find all the male members of club "Hopkins Student Enterprises". Show the first name and last name. [/INST]
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";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: What are the first name and last name of each male member in club "Hopkins Student Enterprises"? [/INST]
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";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Find all members of "Bootup Baltimore" whose major is "600". Show the first name and last name. [/INST]
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";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Which members of "Bootup Baltimore" major in "600"? Give me their first names and last names. [/INST]
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";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Which club has the most members majoring in "600"? [/INST]
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;
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Find the club which has the largest number of members majoring in "600". [/INST]
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;
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Find the name of the club that has the most female students. [/INST]
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;
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Which club has the most female students as their members? Give me the name of the club. [/INST]
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;
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: What is the description of the club named "Tennis Club"? [/INST]
SELECT clubdesc FROM club WHERE clubname = "Tennis Club";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Find the description of the club called "Tennis Club". [/INST]
SELECT clubdesc FROM club WHERE clubname = "Tennis Club";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Find the description of the club "Pen and Paper Gaming". [/INST]
SELECT clubdesc FROM club WHERE clubname = "Pen and Paper Gaming";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: What is the description of the club "Pen and Paper Gaming"? [/INST]
SELECT clubdesc FROM club WHERE clubname = "Pen and Paper Gaming";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: What is the location of the club named "Tennis Club"? [/INST]
SELECT clublocation FROM club WHERE clubname = "Tennis Club";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Where us the club named "Tennis Club" located? [/INST]
SELECT clublocation FROM club WHERE clubname = "Tennis Club";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Find the location of the club "Pen and Paper Gaming". [/INST]
SELECT clublocation FROM club WHERE clubname = "Pen and Paper Gaming";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Where is the club "Pen and Paper Gaming" located? [/INST]
SELECT clublocation FROM club WHERE clubname = "Pen and Paper Gaming";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Where is the club "Hopkins Student Enterprises" located? [/INST]
SELECT clublocation FROM club WHERE clubname = "Hopkins Student Enterprises";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Tell me the location of the club "Hopkins Student Enterprises". [/INST]
SELECT clublocation FROM club WHERE clubname = "Hopkins Student Enterprises";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Find the name of all the clubs at "AKW". [/INST]
SELECT clubname FROM club WHERE clublocation = "AKW";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Which clubs are located at "AKW"? Return the club names. [/INST]
SELECT clubname FROM club WHERE clublocation = "AKW";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: How many clubs are located at "HHH"? [/INST]
SELECT count(*) FROM club WHERE clublocation = "HHH";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Count the number of clubs located at "HHH". [/INST]
SELECT count(*) FROM club WHERE clublocation = "HHH";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: What are the first and last name of the president of the club "Bootup Baltimore"? [/INST]
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";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Who is the president of the club "Bootup Baltimore"? Give me the first and last name. [/INST]
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";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Who is the "CTO" of club "Hopkins Student Enterprises"? Show the first name and last name. [/INST]
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";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Find the first name and last name for the "CTO" of the club "Hopkins Student Enterprises"? [/INST]
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";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: How many different roles are there in the club "Bootup Baltimore"? [/INST]
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";
Tables: Student, Club, Member_of_club Columns: Student.StuID, Student.LName, Student.Fname, Student.Age, Student.Sex, Student.Major, Student.Advisor, Student.city_code, Club.ClubID, Club.ClubName, Club.ClubDesc, Club.ClubLocation, Member_of_club.StuID, Member_of_club.ClubID, Member_of_club.Position Question: Count the number of different positions in the club "Bootup Baltimore". [/INST]
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";