SELECT ts arraySumarraySlicetotal 1 i as total_num arrayEnumeratetotal as i where ts = toDate#total_game_timestart#什么意思
这是一个ClickHouse数据库的查询语句。
意思是从表格中选择时间戳(ts),并计算在每个时间戳下的total数组的子数组之和(从索引1到i),以及total数组的枚举值(即数组中每个元素的索引值)。查询的时间戳应该在指定的日期之后(#total_game_time.start#)。
具体地说,该查询语句返回一个包含以下列的结果表格:
- ts:时间戳
- total_num:在每个时间戳下,total数组的子数组之和(从索引1到i)
- i:total数组的枚举值(即数组中每个元素的索引值)
原文地址: https://www.cveoy.top/t/topic/g155 著作权归作者所有。请勿转载和采集!