This list is for discussions about the development *of* NHibernate rather
than development *with* NHibernate.  Please direct such questions to the
NHUSERS list at http://groups.google.com/group/nhusers.

Your specific issue can be solved in several different ways; here's one way
to solve it (using HQL):
http://stackoverflow.com/questions/692975/nhibernate-group-by-and-count.
Some searching of the internet for "nhibernate group by" will turn up many
other approaches to achieve the same goal as well.

Steve Bohlen
[email protected]
http://blog.unhandled-exceptions.com
http://twitter.com/sbohlen


On Sat, Nov 19, 2011 at 12:34 AM, dinesh ahuja <[email protected]>wrote:

> Hello
>
> I am learning NHibernate and so came across a technical problem. I
> have a table like below
>
> ID,
> UserId,
> Date,
> HoursWorked
>
> I want to get the top 20 Users based on the sum of hours they worked.
> So the result i want should be like below.
>
> UserId,Sum(HoursWorked)
>
> 001,500
> 003,480,
> 008,450
>
> Please suggest how can i get result like this.
>
> Thanks in advance.
>
> Dinesh
>

Reply via email to