File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Databases
»
Object Relational Mapping
Author
Avg(...) aggregate function
subhashchandra medhiassam
Ranch Hand
Joined: Sep 10, 2008
Posts: 72
posted
Mar 31, 2009 02:34:33
0
Dear friends,
I would like to know how to use the avg(...) aggregate function available in hibernate. Kindly help me with some simple example.
Thanks in advance,
Subhash
Sridhar Santhanakrishnan
Ranch Hand
Joined: Mar 20, 2007
Posts: 317
posted
Mar 31, 2009 02:40:46
0
select avg(e.salary) from Employee e
subhashchandra medhiassam
Ranch Hand
Joined: Sep 10, 2008
Posts: 72
posted
Mar 31, 2009 04:04:21
0
Thanks. But i would like to know how to execute the query and retrieve the result of the avg(...) function. Kindly help.
Subhash
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
I like...
posted
Mar 31, 2009 04:08:00
0
Here
is the best place to start. Have a read of the chapter on Querying.
JavaRanch FAQ
HowToAskQuestionsOnJavaRanch
I agree. Here's the link:
http://zeroturnaround.com/jrebel/download
subject: Avg(...) aggregate function
Similar Threads
question about aggregate function
SQL Having Clause
HQL: How to count green eye kittens?
Answers of Sun's Free Proficiency Assessment
Difference Between count() and size
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter