I don’t believe you can access items outside your scope. In the following case:
ds.table.Where(x => x.field1 == value).Sum(y => y.field2)
“y” cannot be any row (not really a row, but whatever) that was already excluded in the Where call.
SIdenote: I didn’t have to use “y” in the second lambda. I could have used “x” in both, since the x variable is contained within the scope of the call. However, I always switch up the names because x & y represent two different things. YMMV.
Every good fantasy or scifi story has one character that’s a proxy for the audience, who doesn’t know the backstory and has to be there so everyone can slow down and explain things in plain English.
Those characters are vital and so are you.