Subject Re: [firebird-support] Re: Master-detail group by problem
Author Dimitry Sibiryakov
>> Something like "Select .. from master where Master.MasterID =
>> Detail.MasterID and (select number of rows from detail where Master.MasterID
>> = Detail.MasterID) = 1" in "pseudo SQL".
>>
>
> This is of course "... (select number of rows distinct SecondaryMasterID
> from ...) ".

I don't understand what you exactly need, but RTFM HAVING and
COUNT([DISTINCT]).

SY, SD.