Question:
given data in a table such as
id, value, date
0, value1, 1999-01-25
1, value2, 1999-01-02
2, value2, 1999-01-04
3, value1, 1999-01-22
4, value2, 2000-01-01
how can i select the latest 'id' for a given same set of 'value' based on
'date'? ie: i would like to be able to get records id's 0 and 4 from
above, since id "0" has the latest date for value1 (1999-01-25) and id "4"
has the least date for value2 (2000-01-01).
i was thinking of using a least function on it, but my problem is I don't
know how exactly it can be done without some (outside) processing. Am I
missing something?
thanks,
--jim
--
And then there was one...
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php