Subject Re: [ib-support] Query options ?
Author Svein Erling Tysvær
I think I would have written this as

select pay.people_id,count(*) from payement pay
join people p
on pay.people_id = people.people_id
where p.born between '01.01.1960' and '31.12.1970'
group by pay.people_id

Check for yourself and see whether this produces the correct result faster
or not.

At 08:22 22.03.2001 -0000, you wrote:
>one question related to INTERBASE SQL :
>select people_id,count(*) from payement
>where people_id in
> (select people_id from people where born between '01.01.1960' and
>'31.12.1970' )
>group by people_id
>but don't know is this the best way .