For the following scenario:
Id Total points Correct Trends
1 12 8
2 12 4
3 10 5
4 10 7
5 10 2
Lets say I am the person with Id = 3.
I want to calculate the Ids which have Total points and Correct Trends greater than me.
If I use the below query then I will not get the user with Id=2 as his Correct Trends is less then mine.
var allAbove = (from item in userQuery
where (item.Id!= myData.Id &&
item.TotalPoints >= (myData.TotalPoints) &&
item.CorrectTrends >= (myData.CorrectTrends) )
I am not able to find a way to check that when Total Points are equal then look for Correct Trends other wise check for Total Points only