Product with last 4 vendors on transaction date
问题 Hi I have this sql and have to translate into NHibernate QueryOver SELECT S.Number, S.Description, S.BrandDescription, subquery.vendornumber, subquery.vendorname FROM Stocks.Stock S left join (select vendorNumber, VendorName, POLID, LastTransactionDate from ( SELECT top 4 v.Number vendorNumber, v.Name VendorName, PLL.Id POLID, max(por.TransactionDate) as LastTransactionDate, ROW_NUMBER() OVER(PARTITION BY v.Number ORDER BY max(por.TransactionDate) DESC) AS rk FROM Purchasing