Task: Text to Code
Input (English): SQL: SELECT Location_Name , Location_Code FROM Ref_Locations GROUP BY Location_Code ORDER BY Count ( * ) Asc LIMIT 1
Feedback: In step 1 , Replace reference locations table with document locations table .
Output (English): SELECT T2.location_name ,  T1.location_code FROM Document_locations AS T1 JOIN Ref_locations AS T2 ON T1.location_code  =  T2.location_code GROUP BY T1.location_code ORDER BY count(*) ASC LIMIT 1