CREATE TABLE t0 ( v0 INT UNIQUE ) ;
INSERT INTO t0 ( v0 ) VALUES ( 8 ) ;
UPDATE t0 SET v0 = 1 WHERE v0 IN ( SELECT v0 FROM t0 WHERE v0 IN ( SELECT DISTINCT v0 FROM t0 WHERE v0 < ( SELECT v0 FROM t0 WHERE v0 > 23 ) ) ORDER BY AVG ( AVG ( v0 ) ) OVER ( ORDER BY v0 DESC ) ) ;
 