gpt4 book ai didi

hibernate - Hibernate 中 group by 子句中的多列

转载 作者:行者123 更新时间:2023-12-04 17:11:34 25 4
gpt4 key购买 nike

如何在 hibernate 中按查询分组(例如 Select column1,column2,min(value) from Foo_Bar where value> 100 group by (Column1,Column2) )?我想要 分组中的多列 部分。

最佳答案

select f.column1, f.column2, min(f.value)
from FooBar f
where f.value > 100
group by f.column1, f.column2

关于hibernate - Hibernate 中 group by 子句中的多列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10640655/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com