Reputation: 2065
How to do Group by query (for e.g. Select column1,column2,min(value) from Foo_Bar where value> 100 group by (Column1,Column2) ) in hibernate? I wanted to have multiple columns in group by part.
Upvotes: 7
Views: 13280
Reputation: 691635
select f.column1, f.column2, min(f.value)
from FooBar f
where f.value > 100
group by f.column1, f.column2
Upvotes: 13