alamb commented on code in PR #16927:
URL: https://github.com/apache/datafusion/pull/16927#discussion_r2240715166


##########
docs/source/user-guide/sql/aggregate_functions.md:
##########
@@ -618,6 +618,27 @@ regr_avgx(expression_y, expression_x)
 - **expression_y**: Dependent variable expression to operate on. Can be a 
constant, column, or function, and any combination of operators.
 - **expression_x**: Independent variable expression to operate on. Can be a 
constant, column, or function, and any combination of operators.
 
+### Exmaple
+
+consider the table:
+
+```text
++-----+-------------+
+| day | temperature |
+| --- | ----------- |
+| 1   | 35          |
+| 2   | 36          |
+| 3   | NULL        |
+| 4   | 37          |
+| 5   | 38          |
++-----+-------------+
+```
+
+```sql
+SELECT regr_avgx(total_sales, day) AS avg_day --considering day(x) independent 
variable

Review Comment:
   the query still refers to a column (`total_sales`) that doesn't appear in 
the query. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to