Subject Re: [firebird-support] Re: Help with query?
Author Milan Babuskov
I wrote:
> Forget about this one. It does not work properly.

Here's a better one:

select f.client, f.versionnumber, f2.speed, f2.ts
from your_table f
join your_table f2
on f.client = f2.client
and f.versionnumber = f2.versionnumber
group by f.client, f.versionnumber, f2.speed, f2.ts
having min(f.ts) = f2.ts


If you have a primary key on the table, use that for JOIN rather than
those fields.

--
Milan Babuskov
http://swoes.blogspot.com/
http://www.flamerobin.org