可以用partition https://docs.dolphindb.cn/zh/help/200/SQLStatements/partition.html?highlight=partition 用where条件指定分区,select count(*) from loadTable('dfs://db1','table1') where month(date)=202311M 类似这样
回答于 2023-12-08 13:55
这个场景tm更合适吧https://docs.dolphindb.cn/zh/help/200/FunctionsandCommands/SeriesOfFunctions/tmFunctions.html?highlight=tm 完整的窗口函数教程可以参考https://gitee.com/dolphindb/Tutorials_CN/blob/master/window_cal.md B站视频:https://www.bilibili.com/video/BV1Tj411j7Pd/?spm_id_from=333.337.search...
回答于 2023-12-08 13:52
不同引擎触发规则不一样呢,用户手册应该有说明的 https://docs.dolphindb.cn/zh/help/FunctionsandCommands/FunctionReferences/c/createTimeSeriesEngine.html
回答于 2023-12-08 13:46
可以用atImax https://docs.dolphindb.cn/zh/help/200/FunctionsandCommands/FunctionReferences/a/atImax.html
回答于 2023-12-08 10:54
把你的函数定义为projection就是了。这是函数式编程的经典用法 把你需要的变量/常量作为参数给函数。函数的公开API就是带上了这些已知变量/常量的projection。
回答于 2023-12-08 10:42