SQL window functions: version support
The version gates that decide whether a window query runs: base functions, frames, FILTER/EXCLUDE and IGNORE NULLS all arrived separately.
- Categoria
- Janela
- Returns
n/a- In this category
- 71 of 79
Sintaxe
n/a (version matrix)
Suporte a mecanismos
| Motor | Support | Notas |
|---|---|---|
| SQL Server | Sim | 2005 ranking and partition aggregates; 2012 ORDER BY in aggregates, frames, LAG/LEAD; 2022 IGNORE NULLS and WINDOW |
| PostgreSQL | Sim | 8.4+ base; FILTER 9.4+; GROUPS/EXCLUDE 11+ |
| MySQL | Sim | 8.0+; none in 5.7 |
| SQLite | Sim | 3.25+ base; GROUPS/EXCLUDE 3.28+; FILTER and NULLS FIRST/LAST 3.30+ |
| Oracle | Sim | analytic functions since 8i; GROUPS, EXCLUDE and WINDOW clause 21c; QUALIFY 23.26.0, FILTER 23.26.1 |
Exemplos
Any engine
-- features outside the common core, and where they run: -- GROUPS/EXCLUDE: PostgreSQL 11+, SQLite 3.28+, Oracle 21c+ -- FILTER: PostgreSQL 9.4+, SQLite 3.30+, Oracle 23.26.1+ -- IGNORE NULLS: Oracle, SQL Server 2022+ -- WINDOW clause: all, but SQL Server 2022+ and Oracle 21c+
Bom saber
- The last of the five to get window functions was MySQL, with 8.0 (GA in 2018). A fleet that still has 5.7 needs the subquery and self-join fallbacks.
- Frames matured at different speeds: SQL Server has had ROWS/RANGE frames since 2012 but still no GROUPS, EXCLUDE or RANGE offsets in 2025; SQLite got GROUPS and EXCLUDE in 2019, Oracle in 21c.
- SQLite's version comes from whatever library the app or OS ships, not from a server upgrade, so check sqlite_version() on the actual target.
Questions about Window Function Versions
Which engine has the most complete window support?
Oracle 21c and later: GROUPS, EXCLUDE, IGNORE NULLS, FROM LAST and the WINDOW clause, and QUALIFY and FILTER from the 23.26 release updates. PostgreSQL 11+ is next (no IGNORE NULLS). Cross-engine SQL should stick to ROWS frames, RANGE with UNBOUNDED/CURRENT ROW, and CASE conditionals.
How do I check the SQLite version in production?
SELECT sqlite_version(), and check that it is at least 3.25 before deploying window queries; bundled builds vary by OS and app.
Browse every function in the SQL function reference, or see what the SQLly desktop app does for your database.
Related on SQLly
Cheat sheets for the engines that have it: SQL Server, PostgreSQL, MySQL, SQLite, Oracle.
Functions your engine actually has
SQLly's completion lists the built-in functions of the engine you're connected to, whether that's SQL Server, PostgreSQL, MySQL, SQLite or Oracle. Hover a function for help, and signature hints show each argument as you type.