http://qs321.pair.com?node_id=155138


in reply to Re: Re: MySQL question
in thread MySQL question

Ahh. Then again, with a real database with subselects, that'd be:
SELECT title, doc_num, version FROM atable WHERE (doc_num, version) IN ( SELECT doc_num, MAX(version) FROM atable GROUP BY doc_num );
Again, this won't work in puny MySQL. PostgreSQL or better, baby!

-- Randal L. Schwartz, Perl hacker