Subject | RE: [IB-Architect] Small SQL question |
---|---|
Author | Leyne, Sean |
Post date | 2001-03-21T17:19:06Z |
Goran,
This is not a support list, please re-port this question to the
IB-Support group.
Sean
-----Original Message-----
From: K-INFO d.o.o. [mailto:k-info@...]
Sent: Wednesday, March 21, 2001 12:08 PM
To: IB-Architect@yahoogroups.com
Subject: [IB-Architect] Small SQL question
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
To unsubscribe from this group, send an email to:
IB-Architect-unsubscribe@onelist.com
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
This is not a support list, please re-port this question to the
IB-Support group.
Sean
-----Original Message-----
From: K-INFO d.o.o. [mailto:k-info@...]
Sent: Wednesday, March 21, 2001 12:08 PM
To: IB-Architect@yahoogroups.com
Subject: [IB-Architect] Small SQL question
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
To unsubscribe from this group, send an email to:
IB-Architect-unsubscribe@onelist.com
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/