match qry_type_first_all to qry_type_first_unique