On 15/07/2006, at 2:07 AM, Sergio Duran wrote: How about if we make it simpler, only 1 table Try this: SELECT w2.* FROM ( SELECT name, MAX(startdate) AS startdate FROM worker GROUP BY name ) AS w1 JOIN worker AS w2 ON (w1.name = w2.name AND w1.startdate = w2.startdate); Obviously you would use a real primary key instead of 'name' for the join constraint but you get the idea -- Seeya...Q -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- _____ / Quinton Dolan - [EMAIL PROTECTED] __ __/ / / __/ / / / __ / _/ / / Gold Coast, QLD, Australia __/ __/ __/ ____/ / - / Ph: +61 419 729 806 _______ / _\ |
- Re: [GENERAL] I need help creating a query Q
- Re: [GENERAL] I need help creating a query Richard Broersma Jr
- Re: [GENERAL] I need help creating a query Sergio Duran
- Re: [GENERAL] I need help creating a query Marcin Mank
- Re: [GENERAL] I need help creating a query Sergio Duran