Sometimes I wish to perform a join whereby I take the largest value of one column. Doing this I have to perform a max() and a groupby- which prevents me from retrieving the other columns from the row which was the max (beause they were not contained in a GROUP BY or aggregate function).

To fix this, I join the max value back on the original data source, to get the other columns. However, my problem is that this sometimes returns more than one row.

So, so far I have something like:

```
SELECT * FROM
    (SELECT Col1, Max(Col2) FROM Table GROUP BY Col1) tab1
JOIN
    (SELECT Col1, Col2 FROM Table) tab2
ON tab1.Col2 = tab2.Col2

```

If the above query now returns three rows (which match the largest value for column2) I have a bit of a headache.

If there was an extra column- col3 and for the rows returned by the above query, I only wanted to return the one which was, say the minimum Col3 value- how would I do this?