Subject RE: [firebird-support] Re: 4 most recent detail rows per master row
Author Sasha Matijasic
>
> I can't see how it can since the d.in IN (... FIRST 4) would restrict
> the query to 4 items per master.
>
The structure of query is fine, but you made the error as I wrote. What you
did is get all details where detail.id matches master.id, but that will
always return all rows.

On another note, my answer to original posting was needlessly complex...
that or select count(*) could have beed replaced with simpler coalesce...

> Did you try it?
>
Yes I did. Did you? :)

Sasha