<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.7.4</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.persistence</groupId>
<artifactId>jakarta.persistence</artifactId>
</exclusion>
</exclusions>
</dependency>
答案 0 :(得分:0)
您不能在HAVING子句中引用列别名,而必须重复该表达式:
Select facid, sum(slots) as total
from cd.bookings
group by facid
having sum(slots) > 1000
order by facid;