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