UPDATE table AS t1
JOIN (SELECT obj_id, MIN(float_val) AS 'f'
FROM table
WHERE field_id in (208, 209, 210)
GROUP BY obj_id) t2
ON cms3_object_content_copy.obj_id = t2.obj_id
SET rel_val = CASE WHEN f BETWEEN 0 AND 999 THEN 1
WHEN f BETWEEN 1000 AND 2000 THEN 2
ELSE 3
END
WHERE table.field_id = 402
UPDATE t as t1
SET rev_val=1
WHERE t1.field_id=402 AND t1.obj_id IN (
SELECT t2.obj_id FROM t as t2
WHERE t2.field_id=208 AND t2.float_val>1000 AND t2.float_val<2000
);