Subject | Re: Help with SQL Query |
---|---|
Author | legrand_legrand_63 |
Post date | 2007-09-24T18:52:44Z |
Here is a non tested proposal for FB 2.x
select
ACTIVITIES.ID,
ORDER_NUMBER,
MATERIAL,
DATE_TIME,
TEMP_01_AV,
TEMP_02_AV,
TEMP_03_AV
from ACTIVITIES,
(select
ACTIVITY_ID,
AVG(TEMPO_01) TEMP_01_AV,
AVG(TEMPO_02) TEMP_02_AV,
AVG(TEMPO_03) TEMP_03_AV,
from TEMPERATURES
group by ACTIVITY_ID)
where ID=ACTIVITY_ID(+)
Regards
PAscal
select
ACTIVITIES.ID,
ORDER_NUMBER,
MATERIAL,
DATE_TIME,
TEMP_01_AV,
TEMP_02_AV,
TEMP_03_AV
from ACTIVITIES,
(select
ACTIVITY_ID,
AVG(TEMPO_01) TEMP_01_AV,
AVG(TEMPO_02) TEMP_02_AV,
AVG(TEMPO_03) TEMP_03_AV,
from TEMPERATURES
group by ACTIVITY_ID)
where ID=ACTIVITY_ID(+)
Regards
PAscal