On Sat, 20 Nov 2004 19:14:55 -0800 <[EMAIL PROTECTED]> wrote: > they have the same perid, program and startdate. I would very much like > to get a listing for each perid that shows their perid, program, startdate > and then the latest (only the latest) stopdate. This would give unique
SELECT perid,prog,startdt,MAX(stopdt) FROM test GROUP BY perid,prog,startdt or SELECT perid,prog,MIN(startdt),MAX(stopdt) FROM test GROUP BY perid,prog might do what you wnat -- Drew -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]