Given the following table:
col1 Col2
A 1
B 1
C 1
B 2
B 3
A 0
C 5
how do I write a SELECT query (I just assumed has to be SELECT) that returns the unique items of col1 and the max values of col2, like this:
A 1
B 3
C 5
lang-sql
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeGiven the following table:
col1 Col2
A 1
B 1
C 1
B 2
B 3
A 0
C 5
how do I write a SELECT query (I just assumed has to be SELECT) that returns the unique items of col1 and the max values of col2, like this:
A 1
B 3
C 5