Update missing values in MySQL 5.6 table by selecting values from closest records with same id
Let's say I have a table with logs. The value of status column may be NULL and I would like to UPDATE this value by copying value from the log for same settingid which have non-NULL status and closest (smaller…