select DEPT_CODE, GRADE, PARENT_ID from ${tableName} where tenant_id = :tenantId and
customer_id in (:customerIds) and type in (identityTypes) group by DEPT_CODE,GRADE
一般来说查询的字段要和group by的字段一致,但是mysql做了特殊处理,实际上执行的是
select DEPT_CODE, GRADE, any_value(PARENT_ID) from customer_identity where tenant_id = '10023' and customer_id in (989633593863100416) and type in ("c_dmhub_userid") group by DEPT_CODE, GRADE
any_value()会选择被分到同一组的数据里第一条数据的指定列值作为返回数据,特此记录