A
Alex_Firenze
Hi all,
In my DB I have a table that contains for each date the price returns
of a set of stocks:
example:
DATE, STOCK LABEL, RETURNS
date1, AAA, 10
date1, BBB, 5
date1, CCC, 3
date2, AAA, 9
date2, BBB, 6
date2, CCC, 4
date3, AAA, 6
date3, BBB, 4
date3, CCC, 2
date4, AAA, 11
date4, BBB, 6
date4, CCC, 4
.....
I would like to make a query that give me for each stock the average of
the last 15 days.
In this case the output should be:
STOCK, AVERAGE(Returns,15 days)
Could you help me?? I have tried to do something but without a good
result....
thanks in advance
Alex
In my DB I have a table that contains for each date the price returns
of a set of stocks:
example:
DATE, STOCK LABEL, RETURNS
date1, AAA, 10
date1, BBB, 5
date1, CCC, 3
date2, AAA, 9
date2, BBB, 6
date2, CCC, 4
date3, AAA, 6
date3, BBB, 4
date3, CCC, 2
date4, AAA, 11
date4, BBB, 6
date4, CCC, 4
.....
I would like to make a query that give me for each stock the average of
the last 15 days.
In this case the output should be:
STOCK, AVERAGE(Returns,15 days)
Could you help me?? I have tried to do something but without a good
result....
thanks in advance
Alex