I have a data set that looks like this:
X Y
1 5
1 4
1 3
1 2
1 1
2 10
2 9
2 8
2 4
I would like to select the maximum 3 values in Y for each value of X:
X Y
1 5
1 4
1 3
2 10
2 9
2 8
I'm looking at sort and top, sort allows me to sort on each field, but the count argument seems to only work on the total number of results returned. Top is looking for the most common values, not the maximum values. Am I missing something?
Thanks,
pk
... View more