What is the location code that has the largest number of documents?
select location_code from document_locations group by location_code order by count ( * ) desc limit 1
What about the least number of documents?
select location_code from document_locations group by location_code order by count ( * ) asc limit 1
How about date in location from, then?
select location_code from document_locations order by date_in_location_from desc limit 1