Hi Ola, How about "SELECT id, title, max(version) FROM table GROUP BY version ORDER BY title;" ?
Thats a guess though... Best regards Nils Valentin Tokyo/Japan 2003年 6月 5日 木曜日 22:[EMAIL PROTECTED] さんは書きました: > Hi, > I am running MySQL 4.0.10 gamma. > I have records with data: > id title version > 1 a 1 > 2 a 2 > 3 b 1 > 4 b 2 > > How do I select all the records with highest version for each title? > (The records with id 2 and 4) > I've been thinking about combinating GROUP BY and max(), but I cant get it > to work... > "SELECT id, title, max(version) FROM table GROUP BY title;" returns > 1 a 2 > 3 b 2 > > Thanks for any help /Ola -- ================================================ Valentin Nils Internet Technology E-Mail: [EMAIL PROTECTED] URL: http://www.knowd.co.jp ================================================ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]