JingDas opened a new pull request, #25500: URL: https://github.com/apache/doris/pull/25500
## Proposed changes Support aggregate functions in select without from clause, here are some examples as following: `SELECT 1, 'a', COUNT(), SUM(1) + 1, AVG(2) / COUNT(), MAX(3), MIN(4), RANK() OVER() AS w_rank, DENSE_RANK() OVER() AS w_dense_rank, ROW_NUMBER() OVER() AS w_row_number, SUM(5) OVER() AS w_sum, AVG(6) OVER() AS w_avg, COUNT() OVER() AS w_count, MAX(7) OVER() AS w_max, MIN(8) OVER() AS w_min;` The query result is as following: `1| 'a'|count(*)|(sum(1) + 1)|(avg(2) / cast(count(*) as DOUBLE))|max(3)|min(4)|w_rank|w_dense_rank|w_row_number|w_sum|w_avg|w_count|w_max|w_min| -+---+--------+------------+-----------------------------------+------+------+------+------------+------------+-----+-----+-------+-----+-----+ 1|a | 1| 2| 2.0| 3| 4| 1| 1| 1| 5| 6.0| 1| 7| 8|` <!--Describe your changes.--> ## Further comments Support group or having clause without from will be in another pr. -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org