Non-recursive subquery: top-n

BigQueryDb2 (LUW)DerbyH2MariaDBMySQLOracle DBPostgreSQLSQL ServerSQLite200720092011201320152017201920212023✓ 3.8.3 - 3.50.0⊘ 3.5.7 - 3.7.11⊘ 2008R2 - 2022a✓ 8.4 - 17⊘ 8.3✓ 12cR1 - 23.9a⊘ 11gR2a⊘ 11gR1✓ 8.0.16 - 9.3.0a⊘ 8.0.12 - 8.0.14a✓ 8.0.11⊘ 5.0 - 5.7✓ 10.2 - 12.0.2⊘ 5.1 - 10.1✓ 1.4.199 - 2.3.232⊘ 1.4.191⊘ 10.15.1.3 - 10.17.1.0✓ 9.7 - 12.1.2✓ 2.0⊘ 2.0
  1. Workaround: use row_number() over() to implement top-N query