Hi, I'm using MySQL for the first time and have been trying to solve this basic SQL problem for 2 days... I have tried everything from using JOINs to local variables, searching in www.mysql.com and Paul DuBois MySQL book (Great book!), but failed to do this in a single SQL query has I had use to do with Microsoft SQL Server.
The problem is; If I have this table (versions): Number | Version | Description 1 | A | testing 1 | B | flying And use this query: SELECT Number,MAX(Version),Description FROM versions GROUP BY Number; I will get: Number | Version | Description 1 | B | testing Instead of: Number | Version | Description 1 | B | flying How can I make a single query that solves this problem ?!?! does anyone knows ? Thanks, Miguel Lupi Alves Methods & Tools Specialist, Helpdesk Methods & Tools Customer Solutions Ericsson Telecomunicações, Lda. Division Global Services Tel: +351 446 66 58 Fax: +351 21 446 66 66 Mobile: +351 91 760 14 24 mailto:[EMAIL PROTECTED] --------------------------------------------------------------------- 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