Fix missing space in query
Add left join query to return code type names instead of typeId