Subject Small SQL question
Author K-INFO d.o.o.
Dear friends ,

one question related to INTERBASE SQL :

Let's say there are two tables - PEOPLE and PAYMENT

If I would like to count payments from table PAYMENT for people born between
1960 and 1970 what should be the best way in SQL to do it ?

I have resolve it like :

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 .

Goran