Home > database > Mysql data with the same type of average fill the missing value
Mysql data with the same type of average fill the missing value
Time:10-10
Table has more restaurants per capita consumption of consumption, the restaurant is divided into several types Consumption, some restaurant need to use the restaurant belongs to type of consumption of average to fill the missing value Just began to learn the mysql, and instruct me how to write this to you thank you thank you!!!
CodePudding user response:
The UPDATE test0706 set VALUE=https://bbs.csdn.net/topics/(SELECT * from (SELECT ROUND (avg (` VALUE `), 0) from ` test0706 `) a) where ` VALUE `='0'