Nhibernate QueryOver Representation of GroupBy in an inner join
===

So I'm new to Nhibernate having come from EF. After trying out Query<> and being massively underwhelmed by the lack of supported functions and nonsensical sql, I'm trying out QueryOver but not getting far. Can someone help me with a QueryOver representation of this SQL?

   

    select p2.* from
       PurchaseOrders p2 inner join 
       (SELECT po.PurchaseOrderID, MAX(POS.StatusDate) as LastUpdate FROM PurchaseOrders Po 
       inner join PurchaseOrderStatuses POS on PO.PurchaseOrderID = pos.PurchaseOrderID 
       where pos.StatusID = :@status and po.SupplierID = :@supplierId
       group by po.PurchaseOrderID) p1
       on p2.PurchaseOrderID = p1.PurchaseOrderID