Hi, I face the following situation.I have a number of clients-each with a unique clientid.I have a table with some records -one after the other in time order(datedone field) with actions checked as 'done' or not 'done', in the 'done' field which is either true or false.What I want to to, is to specify in my query the last record-date that has an action marked as done at the same time when the value x='' for every clientid.I have tried what you see but didin't help.
SELECT clientid FROM table_name WHERE datedone = 'max(datedone)' and done = 'true' and x = '' group by clientid; I am new to all this, so any help would be usefull Thanks --------------------------------------------------------------------- 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