...
select
http://sl.id sl_id, sl.code sl_code, sl.name sl_name, sl.agency_id sl_agency, lms.id lms_id, lms.code lms_code, lms.name lms_name, l.id parent_loc_id, l.agency_fk parent_loc_agency, l.code parent_loc_code, l.name parent_loc_name, l.type parent_loc_type
from shelving_location sl,
host_lms lms,
location l
where sl.host_system_id = lms.id
and sl.location_id = l.id