Skip to content

Update AVG documentation for OVER clause - #10392

Open
Gabriel Donizeti Candido (donican) wants to merge 3 commits into
MicrosoftDocs:livefrom
donican:donican-patch-2
Open

Update AVG documentation for OVER clause#10392
Gabriel Donizeti Candido (donican) wants to merge 3 commits into
MicrosoftDocs:livefrom
donican:donican-patch-2

Conversation

@donican

Copy link
Copy Markdown
Contributor

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:

  • order_by_clause as optional.
  • row_or_range_clause as optional and dependent on order_by_clause.
  • The default value of row_or_range_clause when order_by_clause is specified.

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.
@prmerger-automator

Copy link
Copy Markdown
Contributor

Gabriel Donizeti Candido (@donican) : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@prmerger-automator

Copy link
Copy Markdown
Contributor

Gabriel Donizeti Candido (@donican) : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 45189ab:

✅ Validation status: passed

File Status Preview URL Details
docs/t-sql/functions/avg-transact-sql.md ✅Succeeded

For more details, please refer to the build report.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 7ef7a7e:

✅ Validation status: passed

File Status Preview URL Details
docs/t-sql/functions/avg-transact-sql.md ✅Succeeded

For more details, please refer to the build report.

@v-regandowner

Copy link
Copy Markdown
Contributor

Mark Ghanayem (@markingmyname) - Can you review the proposed changes?

IMPORTANT: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 OVER syntax 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 ] ) ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants