xiaolei55 opened a new issue, #28478:
URL: https://github.com/apache/doris/issues/28478

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Description
   
   窗口分析函数支持按照时间窗口,类似语法
   
   `SELECT
     agg_func(agg_col) OVER (
       [PARTITION BY col1[, col2, ...]]
       ORDER BY time_col
       range_definition),
     ...
   FROM ...`
   
   range_definition从句可以支持按照ROWS(已实现)和RANGE(未实现),
   其中RANGE的使用可以指定时间区间,例如统计当前行前30分钟的数据,就可以使用下面的range_definition来表示
   
   `RANGE BETWEEN INTERVAL '30' MINUTE PRECEDING AND CURRENT ROW`
   
   当然也支持前后时间范围,例如统计当前行前后30分钟的数据
   
   `RANGE BETWEEN INTERVAL '30' MINUTE PRECEDING AND INTERVAL '30' MINUTE 
FOLLOWING`
   
   ### Use case
   
   解决按照时间范围的窗口统计,丰富窗口分析函数的使用场景
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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.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

Reply via email to