Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Newbie needs PL/SQL help

Newbie needs PL/SQL help

From: Jay Wright <valkyry_at_ibm.net>
Date: 6 Apr 1999 15:46:05 GMT
Message-ID: <XtL26jvDWiRB-pn2-hyy2LMNv3FMY@slip166-72-126-205.in.us.ibm.net>


Does anyone have a general idea for a user created moving average function ?
It would be starting with paramenters something like this

TEMPERATURE NUMBER(4,2)
CITY_SYMBOL VARCHAR2(10)
SEQ_NO seq_no of the CURRENT_ROW, where seq_no is taken from the date

the moving average length such as 10 days, 20 days, etc.

the output of the moving avg funtion would the date selected and the moving avg would be the sum
of the temperatures divided by the same number. example.

select city, temperature,
mov_avg (city_symbol, seq_no, 20) as ma20 from city_temp
where city_symbol = 'AUSTIN';

any help please Received on Tue Apr 06 1999 - 10:46:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US