hibernate是不是不支持子查询
select prop_department, prop_team,name, max(case ifnull(state,-1) when -1 then count else 0 end) as 'null', max(case state when 1 then count else 0 end) as '1', max(case state when 2 then count else 0 end) as '2', max(case state when 3 then count else 0 end) as '3' from (select i.prop_department , i.prop_team , u.name,i.cus_int_03 as state,count(*) as count from Items i , users u where u.id=i.logged_by group by i.prop_department,i.prop_team,u.name,i.cus_int_03) table1 group by prop_department,prop_team,name
用这个语句查询的时候一直报错,如果table1是一张实际的表就一点问题都没有。各位大侠指点下迷津,看看应该怎么改才能让hibernate支持这个语句。