Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: What are the different location codes for documents? [/INST]

Output: SELECT DISTINCT location_code FROM Document_locations;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: Give me all the distinct location codes for documents. [/INST]

Output: SELECT DISTINCT location_code FROM Document_locations;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: Show the location name for document "Robin CV". [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: What is the location name of the document "Robin CV"? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: Show the location code, the starting date and ending data in that location for all the documents. [/INST]

Output: SELECT location_code ,  date_in_location_from ,  date_in_locaton_to FROM Document_locations;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: What are each document's location code, and starting date and ending data in that location? [/INST]

Output: SELECT location_code ,  date_in_location_from ,  date_in_locaton_to FROM Document_locations;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: What is "the date in location from" and "the date in location to" for the document with name "Robin CV"? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: Find the starting date and ending data in location for the document named "Robin CV". [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: Show the location codes and the number of documents in each location. [/INST]

Output: SELECT location_code ,  count(*) FROM Document_locations GROUP BY location_code;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: What is the code of each location and the number of documents in that location? [/INST]

Output: SELECT location_code ,  count(*) FROM Document_locations GROUP BY location_code;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: What is the location code with the most documents? [/INST]

Output: SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY count(*) DESC LIMIT 1;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: Find the code of the location with the largest number of documents. [/INST]

Output: SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY count(*) DESC LIMIT 1;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: Show the location codes with at least 3 documents. [/INST]

Output: SELECT location_code FROM Document_locations GROUP BY location_code HAVING count(*)  >=  3;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: What are the codes of the locations with at least three documents? [/INST]

Output: SELECT location_code FROM Document_locations GROUP BY location_code HAVING count(*)  >=  3;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: Show the location name and code with the least documents. [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: What are the name and code of the location with the smallest number of documents? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: What are the names of the employees who authorised the destruction and the employees who destroyed the corresponding documents? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: List the names of the employees who authorized the destruction of documents and the employees who destroyed the corresponding documents. [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: Show the id of each employee and the number of document destruction authorised by that employee. [/INST]

Output: SELECT Destruction_Authorised_by_Employee_ID ,  count(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: What are the id of each employee and the number of document destruction authorised by that employee? [/INST]

Output: SELECT Destruction_Authorised_by_Employee_ID ,  count(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: Show the employee ids and the number of documents destroyed by each employee. [/INST]

Output: SELECT Destroyed_by_Employee_ID ,  count(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: What are the id of each employee and the number of document destroyed by that employee? [/INST]

Output: SELECT Destroyed_by_Employee_ID ,  count(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: Show the ids of the employees who don't authorize destruction for any document. [/INST]

Output: SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: Which employees do not authorize destruction for any document? Give me their employee ids. [/INST]

Output: SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: Show the ids of all employees who have authorized destruction. [/INST]

Output: SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: What are the ids of all the employees who authorize document destruction? [/INST]

Output: SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: Show the ids of all employees who have destroyed a document. [/INST]

Output: SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: What are the ids of all the employees who have destroyed documents? [/INST]

Output: SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: Show the ids of all employees who don't destroy any document. [/INST]

Output: SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: Which employees do not destroy any document? Find their employee ids. [/INST]

Output: SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: Show the ids of all employees who have either destroyed a document or made an authorization to do this. [/INST]

Output: SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed;


Input:
[INST] Here is a database schema:
Ref_Document_Types :
Document_Type_Code [ TEXT ] primary_key
Document_Type_Name [ TEXT ]
Document_Type_Description [ TEXT ]

Ref_Calendar :
Calendar_Date [ TEXT ] primary_key
Day_Number [ INT ]

Ref_Locations :
Location_Code [ TEXT ] primary_key
Location_Name [ TEXT ]
Location_Description [ TEXT ]

Roles :
Role_Code [ TEXT ] primary_key
Role_Name [ TEXT ]
Role_Description [ TEXT ]

All_Documents :
Document_ID [ INT ] primary_key
Date_Stored [ TEXT ] All_Documents.Date_Stored = Ref_Calendar.Calendar_Date
Document_Type_Code [ TEXT ] All_Documents.Document_Type_Code = Ref_Document_Types.Document_Type_Code
Document_Name [ TEXT ]
Document_Description [ TEXT ]
Other_Details [ TEXT ]

Employees :
Employee_ID [ INT ] primary_key
Role_Code [ TEXT ] Employees.Role_Code = Roles.Role_Code
Employee_Name [ TEXT ]
Gender_MFU [ TEXT ]
Date_of_Birth [ TEXT ]
Other_Details [ TEXT ]

Document_Locations :
Document_ID [ INT ] primary_key Document_Locations.Document_ID = All_Documents.Document_ID
Location_Code [ TEXT ] Document_Locations.Location_Code = Ref_Locations.Location_Code
Date_in_Location_From [ TEXT ] Document_Locations.Date_in_Location_From = Ref_Calendar.Calendar_Date
Date_in_Locaton_To [ TEXT ] Document_Locations.Date_in_Locaton_To = Ref_Calendar.Calendar_Date

Documents_to_be_Destroyed :
Document_ID [ INT ] primary_key Documents_to_be_Destroyed.Document_ID = All_Documents.Document_ID
Destruction_Authorised_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destruction_Authorised_by_Employee_ID = Employees.Employee_ID
Destroyed_by_Employee_ID [ INT ] Documents_to_be_Destroyed.Destroyed_by_Employee_ID = Employees.Employee_ID
Planned_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Planned_Destruction_Date = Ref_Calendar.Calendar_Date
Actual_Destruction_Date [ TEXT ] Documents_to_be_Destroyed.Actual_Destruction_Date = Ref_Calendar.Calendar_Date
Other_Details [ TEXT ]

Please write me a SQL statement that answers the following question: Which employees have either destroyed a document or made an authorization to do so? Return their employee ids. [/INST]

Output: SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed;


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: How many clubs are there? [/INST]

Output: SELECT count(*) FROM club;


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Count the total number of clubs. [/INST]

Output: SELECT count(*) FROM club;


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: What are the names of all clubs? [/INST]

Output: SELECT clubname FROM club;


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Give me the name of each club. [/INST]

Output: SELECT clubname FROM club;


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: How many students are there? [/INST]

Output: SELECT count(*) FROM student;


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Count the total number of students. [/INST]

Output: SELECT count(*) FROM student;


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: What are the first names of all the students? [/INST]

Output: SELECT DISTINCT fname FROM student;


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Find each student's first name. [/INST]

Output: SELECT DISTINCT fname FROM student;


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Find the last names of the members of the club "Bootup Baltimore". [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Who are the members of the club named "Bootup Baltimore"? Give me their last names. [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Who are the members of the club named "Hopkins Student Enterprises"? Show the last name. [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Return the last name for the members of the club named "Hopkins Student Enterprises". [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: How many members does the club "Tennis Club" has? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Count the members of the club "Tennis Club". [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Find the number of members of club "Pen and Paper Gaming". [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: How many people have membership in the club "Pen and Paper Gaming"? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: How many clubs does "Linda Smith" belong to? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: How many clubs does "Linda Smith" have membership for? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Find the number of clubs where "Tracy Kim" is a member. [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: For how many clubs is "Tracy Kim" a member? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Find all the female members of club "Bootup Baltimore". Show the first name and last name. [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Give me the first name and last name for all the female members of the club "Bootup Baltimore". [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Find all the male members of club "Hopkins Student Enterprises". Show the first name and last name. [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: What are the first name and last name of each male member in club "Hopkins Student Enterprises"? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Find all members of "Bootup Baltimore" whose major is "600". Show the first name and last name. [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Which members of "Bootup Baltimore" major in "600"? Give me their first names and last names. [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Which club has the most members majoring in "600"? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Find the club which has the largest number of members majoring in "600". [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Find the name of the club that has the most female students. [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Which club has the most female students as their members? Give me the name of the club. [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: What is the description of the club named "Tennis Club"? [/INST]

Output: SELECT clubdesc FROM club WHERE clubname  =  "Tennis Club";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Find the description of the club called "Tennis Club". [/INST]

Output: SELECT clubdesc FROM club WHERE clubname  =  "Tennis Club";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Find the description of the club "Pen and Paper Gaming". [/INST]

Output: SELECT clubdesc FROM club WHERE clubname  =  "Pen and Paper Gaming";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: What is the description of the club "Pen and Paper Gaming"? [/INST]

Output: SELECT clubdesc FROM club WHERE clubname  =  "Pen and Paper Gaming";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: What is the location of the club named "Tennis Club"? [/INST]

Output: SELECT clublocation FROM club WHERE clubname  =  "Tennis Club";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Where us the club named "Tennis Club" located? [/INST]

Output: SELECT clublocation FROM club WHERE clubname  =  "Tennis Club";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Find the location of the club "Pen and Paper Gaming". [/INST]

Output: SELECT clublocation FROM club WHERE clubname  =  "Pen and Paper Gaming";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Where is the club "Pen and Paper Gaming" located? [/INST]

Output: SELECT clublocation FROM club WHERE clubname  =  "Pen and Paper Gaming";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Where is the club "Hopkins Student Enterprises" located? [/INST]

Output: SELECT clublocation FROM club WHERE clubname  =  "Hopkins Student Enterprises";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Tell me the location of the club "Hopkins Student Enterprises". [/INST]

Output: SELECT clublocation FROM club WHERE clubname  =  "Hopkins Student Enterprises";


Input:
[INST] Here is a database schema:
Student :
StuID [ INT ] primary_key
LName [ TEXT ]
Fname [ TEXT ]
Age [ INT ]
Sex [ TEXT ]
Major [ INT ]
Advisor [ INT ]
city_code [ TEXT ]

Club :
ClubID [ INT ] primary_key
ClubName [ TEXT ]
ClubDesc [ TEXT ]
ClubLocation [ TEXT ]

Member_of_club :
StuID [ INT ] Member_of_club.StuID = Student.StuID
ClubID [ INT ] Member_of_club.ClubID = Club.ClubID
Position [ TEXT ]

Please write me a SQL statement that answers the following question: Find the name of all the clubs at "AKW". [/INST]

Output: SELECT clubname FROM club WHERE clublocation  =  "AKW";