dolphindb时间存储在数据库中,是存储成int或者long类型的
从1970.01.01,开始存储的
然后,2022.01.02,之所以分组成,2021.12.30,是根据计算获得的,计算公式如下:
2022.01.02 - int(2022.01.02) % 7
关于计算的描述如下:
开发手册中,https://dolphindb.cn/cn/help/FunctionsandCommands/FunctionReferences/b/bar.html?highlight=bar
t=table(2022.01.01 + 1..20 as time, rand(100, 20) as x)
select max(x) from t group by bar(time, 7d);
为什么查询结果是,2021.12.30开头的?