1

I am trying to select from a table that contains some duplicate rows like the one below:

OS Value
A 5
A 10
B 5
B 10

I am trying to remove duplicates from both columns to get only unique values. It doesn´t matter which value will be at which OS. It should get something like this:

OS Value
A 5
B 10

Thank you!

1 Answers1

-1

You can group by the first column and get the max value of the second:

SELECT OS, MAX(Value)
FROM oss 
GROUP BY OS

Check this DB fiddle.

Joaquín L. Robles
  • 5,888
  • 8
  • 60
  • 91