Discussion:
[nhusers] Create a Query as below Using QueryOver or Query
Abdul Samad
2017-12-17 13:52:37 UTC
Permalink
Hi All,

I wanted to generate a query as below.

Select EMP.EmployeeName, EMP.NoOfReportees, D.DepartmentName from
(Select E.EmployeeName, COUNT(R.ReportingEmployeeID) FROM Employees E
JOIN Reportees R ON E.EmployeeID = R.managerID
GROUP BY E.EmployeeName) EMP
JOIN Department D ON EMP.DepartmentID = D.DepartmentID

Please let me know How can I use queryover to generate this above query.
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nhusers+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.
Gunnar Liljas
2017-12-17 20:39:01 UTC
Permalink
And how are your classes mapped to these tables?
Post by Abdul Samad
Hi All,
I wanted to generate a query as below.
Select EMP.EmployeeName, EMP.NoOfReportees, D.DepartmentName from
(Select E.EmployeeName, COUNT(R.ReportingEmployeeID) FROM Employees E
JOIN Reportees R ON E.EmployeeID = R.managerID
GROUP BY E.EmployeeName) EMP
JOIN Department D ON EMP.DepartmentID = D.DepartmentID
Please let me know How can I use queryover to generate this above query.
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nhusers+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.
Loading...