I have a sql server table which looks like this:-
Column1 | Column2 |
---|---|
ABC-123 | 444 |
ABC-123 | 555 |
ABC-123 | 666 |
ABC-222 | 552 |
ABC-222 | 111 |
ABC-222 | 552 |
How do I get data from this table with unique values from Column1 and the smallest value from Column two?
So a valid result for the above data would look like:
Column1 | Column2 |
---|---|
ABC-123 | 444 |
ABC-222 | 111 |