Subject | Re: [firebird-support] select multiple max |
---|---|
Author | Dimitry Sibiryakov |
Post date | 2010-03-05T10:54:05Z |
05.03.2010 11:40, korkless wrote:
(select source_id, max(date) mdate from results group by source_id) r1
on r.date=r1.mdate and r.source_id=r1.source_id
--
SY, SD.
> where ID is the id of the row witht row.SOURCE_ID = SOURCE_IDselect r.id, r.source_id from results r join
> and wich have the last timestamp.
>
> what's the best way to do that? thanks
(select source_id, max(date) mdate from results group by source_id) r1
on r.date=r1.mdate and r.source_id=r1.source_id
--
SY, SD.