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 number of documents with document type code CV or BK. [/INST]

Output: SELECT count(*) FROM All_documents WHERE document_type_code  =  "CV" OR document_type_code  =  "BK";


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: How many documents have document type code CV or BK? [/INST]

Output: SELECT count(*) FROM All_documents WHERE document_type_code  =  "CV" OR document_type_code  =  "BK";


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 when the document "Marry CV" was stored? [/INST]

Output: SELECT date_stored FROM All_documents WHERE Document_name  =  "Marry 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: When was the document named "Marry CV" stored? Give me the date. [/INST]

Output: SELECT date_stored FROM All_documents WHERE Document_name  =  "Marry 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 day Number and date of all the documents? [/INST]

Output: SELECT T2.day_Number ,  T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored  =  T2.calendar_date;


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: Return the day Number and stored date for all the documents. [/INST]

Output: SELECT T2.day_Number ,  T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored  =  T2.calendar_date;


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 document type name for the document with name "How to read a book"? [/INST]

Output: SELECT T2.document_type_name FROM All_documents AS T1 JOIN Ref_document_types AS T2 ON T1.document_type_code  =  T2.document_type_code WHERE T1.document_name  =  "How to read a book";


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 document type name of the document named "How to read a book". [/INST]

Output: SELECT T2.document_type_name FROM All_documents AS T1 JOIN Ref_document_types AS T2 ON T1.document_type_code  =  T2.document_type_code WHERE T1.document_name  =  "How to read a book";


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 number of locations. [/INST]

Output: SELECT count(*) FROM Ref_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: How many locations are listed in the database? [/INST]

Output: SELECT count(*) FROM Ref_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: List all location codes and location names. [/INST]

Output: SELECT location_code ,  location_name FROM Ref_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 all the location codes and location names? [/INST]

Output: SELECT location_code ,  location_name FROM Ref_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 the name and description for location code x? [/INST]

Output: SELECT location_name ,  location_description FROM Ref_locations WHERE location_code  =  "x";


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 the name and description of the location with code x. [/INST]

Output: SELECT location_name ,  location_description FROM Ref_locations WHERE location_code  =  "x";


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 for the country "Canada"? [/INST]

Output: SELECT location_code FROM Ref_locations WHERE location_name  =  "Canada";


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 of the country "Canada". [/INST]

Output: SELECT location_code FROM Ref_locations WHERE location_name  =  "Canada";


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: How many roles are there? [/INST]

Output: SELECT count(*) FROM ROLES;


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: Count the total number of roles listed. [/INST]

Output: SELECT count(*) FROM ROLES;


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 all role codes, role names, and role descriptions. [/INST]

Output: SELECT role_code ,  role_name ,  role_description FROM ROLES;


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 all the role codes, role names, and role descriptions? [/INST]

Output: SELECT role_code ,  role_name ,  role_description FROM ROLES;


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 description for role code "MG"? [/INST]

Output: SELECT role_name ,  role_description FROM ROLES WHERE role_code  =  "MG";


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 name and description of the role with code "MG". [/INST]

Output: SELECT role_name ,  role_description FROM ROLES WHERE role_code  =  "MG";


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 description for role name "Proof Reader". [/INST]

Output: SELECT role_description FROM ROLES WHERE role_name  =  "Proof Reader";


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 description of the role named "Proof Reader"? [/INST]

Output: SELECT role_description FROM ROLES WHERE role_name  =  "Proof Reader";


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: How many employees do we have? [/INST]

Output: SELECT count(*) FROM Employees;


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 number of employees we have. [/INST]

Output: SELECT count(*) FROM Employees;


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 name, role code, and date of birth for the employee with name 'Armani'. [/INST]

Output: SELECT employee_name ,  role_code ,  date_of_birth FROM Employees WHERE employee_Name  =  'Armani';


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, role code, and date of birth of the employee named 'Armani'? [/INST]

Output: SELECT employee_name ,  role_code ,  date_of_birth FROM Employees WHERE employee_Name  =  'Armani';


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 id for the employee called Ebba? [/INST]

Output: SELECT employee_ID FROM Employees WHERE employee_name  =  "Ebba";


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 the employee named Ebba. [/INST]

Output: SELECT employee_ID FROM Employees WHERE employee_name  =  "Ebba";


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 names of all the employees with role "HR". [/INST]

Output: SELECT employee_name FROM Employees WHERE role_code  =  "HR";


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 the role with code "HR"? Find their names. [/INST]

Output: SELECT employee_name FROM Employees WHERE role_code  =  "HR";


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 all role codes and the number of employees in each role. [/INST]

Output: SELECT role_code ,  count(*) FROM Employees GROUP BY role_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 role and the number of employees in each role? [/INST]

Output: SELECT role_code ,  count(*) FROM Employees GROUP BY role_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 role code with the largest number of employees? [/INST]

Output: SELECT role_code FROM Employees GROUP BY role_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 role that have the most employees. [/INST]

Output: SELECT role_code FROM Employees GROUP BY role_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 all role codes with at least 3 employees. [/INST]

Output: SELECT role_code FROM Employees GROUP BY role_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 roles with three or more employees? Give me the role codes. [/INST]

Output: SELECT role_code FROM Employees GROUP BY role_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 role code with the least employees. [/INST]

Output: SELECT role_code FROM Employees GROUP BY role_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 is the role with the smallest number of employees? Find the role codes. [/INST]

Output: SELECT role_code FROM Employees GROUP BY role_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 is the role name and role description for employee called Ebba? [/INST]

Output: SELECT T2.role_name ,  T2.role_description FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code  =  T2.role_code WHERE T1.employee_name  =  "Ebba";


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 name and description of the role played by the employee named Ebba. [/INST]

Output: SELECT T2.role_name ,  T2.role_description FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code  =  T2.role_code WHERE T1.employee_name  =  "Ebba";


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 names of employees with role name Editor. [/INST]

Output: SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code  =  T2.role_code WHERE T2.role_name  =  "Editor";


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 names of all the employees whose the role name is "Editor". [/INST]

Output: SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code  =  T2.role_code WHERE T2.role_name  =  "Editor";


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 for all employees with role name "Human Resource" or "Manager". [/INST]

Output: SELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code  =  T2.role_code WHERE T2.role_name  =  "Human Resource" OR T2.role_name  =  "Manager";


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 employee ids of the employees whose role name is "Human Resource" or "Manager"? [/INST]

Output: SELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code  =  T2.role_code WHERE T2.role_name  =  "Human Resource" OR T2.role_name  =  "Manager";