jackwener commented on PR #4365: URL: https://github.com/apache/arrow-datafusion/pull/4365#issuecomment-1330881348
@mingmwang look like alias can't be in groupby. sql 1999 ``` <group by clause> Function Specify a grouped table derived by the application of the <group by clause> to the result of the previously specified clause. Format <group by clause> ::= GROUP BY <grouping specification> <grouping specification> ::= <grouping column reference> | <rollup list> | <cube list> | <grouping sets list> | <grand total> | <concatenated grouping> ``` pg: ``` -- create CREATE TABLE EMPLOYEE ( a INTEGER PRIMARY KEY, b INTEGER, c INTEGER ); -- insert INSERT INTO EMPLOYEE VALUES (0001, 0001, 0001); INSERT INTO EMPLOYEE VALUES (0002, 0002, 0002); -- fetch SELECT sum(b) FROM EMPLOYEE group by as c; ERROR: syntax error at or near "as" ``` -- 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...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org