I have a view that returns data that looks like this:
ID Comp_Sk
1 101
2 102
2 103
3 105
I want to return only the first, third and fourth rows. The duplicate record that has 102 as the Comp_Sk value of 102 should be eliminated from the select. I just want the largest value of the Comp_Sk field. What's the best way to do this?
ID Comp_Sk
1 101
2 102
2 103
3 105
I want to return only the first, third and fourth rows. The duplicate record that has 102 as the Comp_Sk value of 102 should be eliminated from the select. I just want the largest value of the Comp_Sk field. What's the best way to do this?