CREATE TABLE t0 ( v1 NUMERIC , v2 INT ) ;
INSERT INTO t0 ( v2 , v1 ) VALUES ( -1 , -128 ) ;
UPDATE t0 SET v2 = ( SELECT v1 FROM t0 ) ORDER BY AVG ( v1 ) OVER ( ORDER BY v1 ) ;