I thought it’ll be easy but i’m really struggling with this.
I have a Table with this schema:
Name, Date, Value
Here’s what I’m trying to achive:
- group all rows by ‘Name’
- from that group, select the ‘Value’ which it’s ‘Date’ is the
biggest
The #1 was easily achieved by GroupBy(“Name”,”it”)
but, now what…?
How do i query the grouped results???
Thank you all.
One of the assumptions I’ve made from your question is “Date is the biggest” you mean the latest one for each.
I’m sure there is probably a better way of doing the linq query but I hope this at least points you in the right direction 🙂