As mentioned in other answer, don't store calculated values in table.
But if you want to know how it can be done, then one of the options is to use the corelated query as follows:
UPDATE store_sales s SET s.weekday_avg = (
SELECT AVG(ss.Sales) AS weekday_avg
FROM store_sales ss
WHERE s.Weekday = ss.weekday
And ss.store=s.store
);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…