Hi
I am new to This Forum
I am doing my project in databases i.e writing the queries
I need some suggestions from you experienced programmers
I have the table with the fileds Sno,Close,Avg
after 10 th row i have to find avg of all closes form 1 to 10 and display as avg colum
in 12 th row i have to discard the colum value of close 1 and find the avg of close from 2 to 11
13 th row i have to discard the colum value of close 2 and find the avg of close from 3 to 12
when i am inserting the new row in the table ,i have to find the avg of 10 closes from this close value
like so on --------------------------------
fro eg
Sno close avg
1 11 null
.
;
,
.
10 123 null
11 231 avg(close(1 to 10)
12 211 avg(close(2 to 11)
13 123 avg(close(3 to 12)
can any one tell me how to write this query
Plz -------------
I am new to This Forum
I am doing my project in databases i.e writing the queries
I need some suggestions from you experienced programmers
I have the table with the fileds Sno,Close,Avg
after 10 th row i have to find avg of all closes form 1 to 10 and display as avg colum
in 12 th row i have to discard the colum value of close 1 and find the avg of close from 2 to 11
13 th row i have to discard the colum value of close 2 and find the avg of close from 3 to 12
when i am inserting the new row in the table ,i have to find the avg of 10 closes from this close value
like so on --------------------------------
fro eg
Sno close avg
1 11 null
.
;
,
.
10 123 null
11 231 avg(close(1 to 10)
12 211 avg(close(2 to 11)
13 123 avg(close(3 to 12)
can any one tell me how to write this query
Plz -------------
Comment