-- 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 ] |
-- -- Show the location code, the starting date and ending data in that location for all the documents.

SELECT location_code ,  date_in_location_from ,  date_in_locaton_to FROM Document_locations;