Question: Show the location name and code with the least documents.
Schema: create table document_locations (location_code varchar, PRIMARY KEY (location_code)); create table ref_locations (location_name varchar, location_code varchar, PRIMARY KEY (location_name))
SQL: 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(*) limit 1