SELECT PROBLEM -
09-16-2009
, 08:49 AM
Hi all,
I have the following table:
Col_id: integer autoincrement PK
Color_id: smallint
I insert a row in the table every time a color is used. So a
color can appear in the table once, never or a lot of times.
I would like to know what colors have been used BUT only the
last time they have been used. For example:
DATA
col_id Color_id
1 2
2 3
3 4
4 1
5 1
6 4
7 5
8 3
RESULT
Color_id Col_id
2 1
3 8
4 6
1 5
5 7
Thanks a lot in advance. |