Update AVG documentation for OVER clause - #10392
Update AVG documentation for OVER clause#10392Gabriel Donizeti Candido (donican) wants to merge 3 commits into
Conversation
Updated the syntax and arguments sections for the AVG function to accurately document the optional order_by_clause and row_or_range_clause in the OVER clause.
|
Gabriel Donizeti Candido (@donican) : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
|
Gabriel Donizeti Candido (@donican) : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
|
Learn Build status updates of commit 45189ab: ✅ Validation status: passed
For more details, please refer to the build report. |
|
Learn Build status updates of commit 7ef7a7e: ✅ Validation status: passed
For more details, please refer to the build report. |
|
Mark Ghanayem (@markingmyname) - Can you review the proposed changes? IMPORTANT: When the changes are ready for publication, adding a #label:"aq-pr-triaged" |
There was a problem hiding this comment.
🟡 Changes recommended
Qualify the documented syntax for APS/PDW before approval.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Updates AVG documentation for the OVER clause, including optional ordering and window-frame syntax.
Changes:
- Corrects
OVERsyntax and argument descriptions. - Documents frame dependencies and default behavior.
File summaries
| File | Summary |
|---|---|
docs/t-sql/functions/avg-transact-sql.md |
Updates AVG syntax and arguments; APS/PDW syntax should be qualified for differing ROWS/RANGE support. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| ```syntaxsql | ||
| AVG ( [ ALL | DISTINCT ] expression ) | ||
| [ OVER ( [ partition_by_clause ] order_by_clause ) ] | ||
| [ OVER ( [ partition_by_clause ] [ order_by_clause ] [ row_or_range_clause ] ) ] |
The current AVG documentation incorrectly states that order_by_clause is required and does not include row_or_range_clause in the OVER clause syntax.
This PR updates the syntax and arguments sections to accurately document: