also, you can improve the query not to include other parent hg with null hw_profile_id