Name query modification to remove left join for performance