1
select count(*) as allCount, sum(t.status='Approved') as approvedCount, sum(t.status='Overdue') as overdueCount,
sum(t.status='Rejected') as rejectedCount, sum(t.status='Awaiting Approval') as awaitingApprovalCount,
sum(t.status='Not Submitted') as notSubmittedCount
from timesheet as t where t.empl_id=2;
在此查询的SELECT COUNT它显示了一个运行时异常,因为查询不excecute为特定的列值
org.hibernate.hql.internal.ast.querrySyntax.Exception:expecting CLOSE ,found "=" nearline 1,sum(t.status="Approved")