Semantic of SQL Query for summing up values
No column is added to the table during the select. Adding columns to a table is usually restricted to a lot fewer people, than those that are allowed to select from a table. You can do this as:

ALTER TABLE tablenames
    ADD AvValue float;

MERGE INTO tablenames x
USING (
    select t.* 
         , sum(value) over (partition by prename order by NumberOfDays) SumValue
    from tablenames t
) y
    ON x.&lt;key&gt; = y.&lt;key&gt;
WHEN MATCHED THEN
    UPDATE SET x.AvValue = y.SumValue/y.NumberOfDays


All untested since I don't know what the key for tablenames is. 

You can probably calculate AvValue directly in the USING clause, but I'll leave that as an exercise. 

EDIT: The implementation of MERGE in SQL-server seems to have several problems, see use-caution-with-sql-servers-merge-statement/ (link provided by Aaron Bertrand in comment. Using an update instead would be something like (still untested):

WITH y AS (
    SELECT t.* 
     , SUM(value) OVER (PARTITION BY prename 
                        ORDER BY NumberOfDays) SumValue
    FROM tablenames t
)
UPDATE y
SET y.AvValue = y.SumValue/y.NumberOfDays;