I don't see the point of users subquery in that - there is no correlation to the outer query so it will return the same value for every row.
So it seems do boil down to something like (HQL): select p.firstname, p.name, count(p) from Person p group by p.firstname, p.name /Oskar 2012/2/15 Itzik Saban <[email protected]>: > Subqueries in HQL. > > בתאריך 15 בפברואר 2012 08:20, מאת Nikhil Ketkar <[email protected]>: >> >> Hi, >> >> I am stuck with a problem where I need to do something like below in >> nhibernate, >> >> select rs.FirstName, rs.name, COUNT(rs.id) from >> ( >> select firstname, lastname, (select id from users where userid = >> 12345') as id >> from person p >> ) rs >> group by rs.firstname, rs.name >> >> How I can achieve this in nhibernate? >> >> Thanks, >> NK >> >> -- >> You received this message because you are subscribed to the Google Groups >> "nhusers" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/nhusers/-/fmLr_YIN3FYJ. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/nhusers?hl=en. > > > > -- > Itzik Saban > > my blog > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
