Hi ppl,

I have already tried the 'rtfm', but it just didn't help.

I have a table:

+-----+--------+------+
| key  | desc    | value |
+-----+--------+------+
|   1   | book    |       4 |
|   2   | book    |       7 |
|   3   | book    |       5 |
|   4   | pen     |       4 |
|   5   | pen     |       5 |
|   6   | pen     |       7 |
+-----+--------+------+

..and I want to get this with a single query:

+-----+--------+------+
| key  | desc    | value |
+-----+--------+------+
|   2   | book    |       7 |
|   6   | pen     |       7 |
+-----+--------+------+

I need to get only one row from col. DESC, the one with the highest VALUE.
With one query...

Appreciate any suggestions, really.

Tibby

Reply via email to