Got an exception while running the query in hql : @Query("select new map(count(t.status) as allCount,sum(case when t.status='Approved' then 1 else 0 end) as approvedCount, "
		+ "sum(case when t.status='Overdue'  then 1 else 0 end) as overdueCount,"
		+ "sum(case when t.status='Rejected' then 1 else 0 end) as rejectedCount,"
		+ "sum(case when t.status='Awaiting Approval' then 1 else 0 end) as awaitingApprovalCount,"
		+ "sum(case when t.status='Not Submitted' then 1 else 0 end) as notSubmittedCount) "
		+ "from Timesheet as t where t.emplId=:employeeId and (t.startDate between date_add(:startDate, interval -6 day) and date_add(:endDate,interval 6 day))"
		+ "and (t.endDate between date_add(:startDate, interval -6 day) and date_add(:endDate,interval 6 day))")


where it throws an exception as org.hibernate.hql.internal.ast.QuerySyntaxException : Expecting CLOSE, found 'day' near line 1.