RE: Query select value on MAX Date
am 24.02.2006 22:04:48 von Nur_Adman------_=_NextPart_001_01C63985.F28B29DD
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Dear All,
=20
I have table like this :
=20
Id | Category | Date |
Value
1 | A | 2005-02-21 |
2000
2 | A | 2004-01-21 |
3000
3 | B | 2006-01-20 |
4000
4 | B | 2005-12-11 |
5000
=20
I want to get the value for each Category where the date is MAX.
So I make the query like this :
=20
"SELECT MAX(Date), Value FROM table GROUP BY Category"
=20
But I get is :
=20
Id | Category | Date |
Value
1 | A | 2005-02-21 |
2000
3 | B | 2006-01-20 |
4000
=20
Could you help me please?
=20
Thanks & Regards,
=20
Anita
=20
=20
=20
=20
=20
=20
=20
=20
------_=_NextPart_001_01C63985.F28B29DD--