Google表格:以HH:MM格式查询数据

问题描述 投票:0回答:1

我应该使用哪个查询来计算总班次时间总任务时间按班次分组?

Google表格查询不允许我对Col2或Col3求和,因为它已格式化为HH:MM(由于源数据为HH:MM,所以我无法将其更改为数字)。

enter image description here

google-sheets string-formatting google-sheets-formula
1个回答
0
投票
=ArrayFormula(query({A2:A,to_pure_number(B2:B),to_pure_number(C2:C)},"select Col1,max(Col3)-min(Col2),sum(Col3)-Sum(Col2) where Col1 is not null group by Col1 label Col1 'Shift',max(Col3)-min(Col2) 'Total',sum(Col3)-Sum(Col2) 'Task' "))

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.