I have IEnumerable<MyData>
which contains following data
Fruits | Name | Quantity |
__________________________
Mango | Jay | 10 |
__________________________
Apple | Jay | 16 |
__________________________
Grapes| Jay | 12 |
__________________________
Mango | Raj | 11 |
__________________________
Apple | Raj | 20 |
__________________________
Grapes| Raj | 3 |
__________________________
Mango | Vik | 20 |
__________________________
Apple | Vik | 15 |
__________________________
I need to select from Linq top two quantity according to name like
Jay (10+16+12) = 38
Raj (11+20+3) = 34
Vik (20+15) = 35
Jay and Vik have top two quantity sum so I need these records
Fruits | Name | Quantity |
__________________________
Mango | Jay | 10 |
__________________________
Apple | Jay | 16 |
__________________________
Grapes| Jay | 12 |
__________________________
Mango | Vik | 20 |
__________________________
Apple | Vik | 15 |
__________________________