请帮我把这个SQL转换为Nhibernate中的Criteria。如果你有任何文件教导如何做,请给我:
select distinct visa
from employee e ,
(select NumberOfEmployee,GroupLeaderId
from [Group] as G JOIN
(select count(distinct employeeid) as NumberOfEmployee, GroupId
from [Project] p JOIN [EmployeeFunctionInProject] e
ON p.ProjectId = e.ProjectId
group by p.ProjectId,Name,GroupId )
as P
ON G.GroupId=P.GroupId
and NumberOfEmployee >=3) as Result
where e.EmployeeId = Result.GroupLeaderId