【发布时间】:2011-03-10 08:39:33
【问题描述】:
我在编写 HQL 时遇到问题。 问题是我想把这样的东西转移到 HQL
select
tb.aca_year,
(case when tw.isfulltime = 1 then count(te) end) as fulltime,
(case when tw.isfulltime = 0 then count(te) end) as parttime
from timetable tb, teacher te, teacherworktype tw
where .............
group by tb.aca_year
................
有什么建议吗?
最好的问候,
【问题讨论】:
-
不知道类模型就不能写HQL。所以告诉我们一些关于你的课程的事情......
-
感谢您关心我的问题。但是,这些课程很长。你能根据我的问题来帮助我吗?
-
我很困惑。
case when tw.isfulltime既不在聚合函数中也不在 group by 子句中tw.isfulltime时如何实际工作...?