TechnoCrat
TechnoCrat

Reputation: 2065

Multiple columns in group by clause in hibernate

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

Answers (1)

JB Nizet
JB Nizet

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

Related Questions