Gobi wrote:
Not sure if this is the right place to ask. I have a table, Weight,
with the following test data:
idx VBS_ID Date Weight
1 111111 10/3/2005 11.5
2 111111 9/5/2004 10
3 111111 10/7/2005 11.51
4 111111 10/8/2005 11.52
5 111112 10/8/2005 10.5
6 111112 10/1/2005 10.3
7 111112 9/28/2005 10
What I would like to do is to get the most recent weight for each
unique VBS_ID. So, in this case, I want a result of:
111111, 10/8/2005, 11.52
111112, 10/8/2005, 10.5
Can anyone tell me how to do this? Thanks.
select VBS_ID , max(Date)
from weight
--
Arno Coetzee
Developer
Flash Media Group
Office : +27 12 342 3490
Mobile : +27 82 693 6180
Fax : + 27 12 430 4269
www.flashmedia.co.za
<<FMG Total messaging solution. For all your GSM (SMS and USSD) messaging needs.
Quick and easy do-it-yourself interfaces. http://www.flashmedia.co.za/tms.php >>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]