Hi,
The following SQL query will fetch you result based on the example given below,
SELECT T.ID , T.VALUE FROM ( SELECT MAX( NUMB ) AS NUMB , NAME FROM TEST3
GROUP BY NAME ) AS A , TEST3 T
WHERE A.NAME = T.NAME AND A.NUMB = T.NUMB
ORDER BY T.ID DESC
Regards,
R.Muralidharan
-
I have a table with a unique id, a name, a number and a value, for example:
id name numb value
-- -
1 tom 101000
2 dick 102000
3 harry 103000
4 dick 214000
5 harry 215000
6 harry 326000
As you can see, tom has 1 entry, dick has 2 and harry