[EDITED: I left the original question below, with some more context and code to reproduce the problem. The short version below contains the essence of the question]
Shor
I think the following works, the SQL is ugly though:
Dim qLinq = From outerOrder In orders
Where outerOrder.OrderDate = currentDate AndAlso
outerOrder.ProductId =
(From x In (From p In products
Join o In orders On p.Id Equals o.ProductId
Where o.OrderDate = outerOrder.OrderDate AndAlso
outerOrder.CustomerId = o.CustomerId
Select p.Id)
Order By x).FirstOrDefault()
Select outerOrder