I realise I knew the answer to this one, but if I modify it slighly it gives me a headache again, like thus:
Table:
col1 | col2 | col3
--------------------
A | 10 | Z
B | 13 | X
B | 14 | X
C | 11 | Y
Now, if I use
SELECT DISTINCT col1, MAX(col2), col3 FROM Table GROUP...
Hi!
I have a problem figuring out how to formulate my select-query. I will try to illustrate my problem :)
Table:
col1 | col2
-----------
A | 10
B | 13
B | 14
C | 11
I want to select every distinct occurence in col1 choosing the record with the highest value in col2, ie. i...