Hey NogDog, thanks for your help again on my other post.
I was testing with MAX() earlier but found it returned only the max value of that column and did not return the entire record which the max value belonged to. I need the entire corresponding record. The table in my example was just a simple example, there would actually be more columns with needed information. So simply using MAX() doesn't work.
For example, if you used this query:
SELECT time_username, MAX(time_in), time_out FROM table_name GROUP BY time_username
You would end up with:
bob 2006-11-21 2005-05-24
steve 2006-11-01 2005-08-29
janet 2005-12-11 2005-12-12
In which case bob and steve's time_out would be incorrect. As would be other columns.
I need to get the "entire" most recent record for each user. Really sounds like it should be a simple task huh? :-)
Thanks,
Peter