According the book the listing 4-38 is:
var expr = from p in products
join o in
(from c in customers
from o in c.Orders
join p in products on o.IdProduct equals p.IdProduct
select new { p.IdProduct, OrderAmount = o.Quantity * p.Price })
on p.IdProduct equals o.IdProduct into orders
select new { p.IdProduct, TotalOrderedAmount = orders.Aggregate( 0m, ( a, o ) => a += o.OrderAmount ) };
we could avoid the outer join:
var expr = from p in products
join order in
(from c in customers
from o in c.Orders
select new { c.Name, o.IdProduct, o.Quantity }) on p.IdProduct equals order.IdProduct into porder
select new { p.IdProduct, Sum = porder.Aggregate(0m, (accum, order) => accum += order.Quantity * p.Price ) };