The over
clause can be empty, meaning over all rows of the result.
SELECT *, COUNT(*) OVER()
FROM …
Returns the original result with an additional column stating how many rows the result has.
Sub clauses:
Product specific: over(range between…)
(strings, multi-columns)
The over
clause is defined in ISO/IEC 9075:2016-2 as part of optional feature T611, “Elementary OLAP operations”.
The essence of SQL tuning in 200 pages
Buy on Amazon
(paperback only)
Paperback and PDF also available at Markus’ store.
Markus offers SQL training and consulting for developers working at companies of any size.
Learn more »