I am trying to do a group by operation on the following table using the query language of Google sheet.
Type Value Duration
A 50 00:50:00
B 5 00:06:00
A 50 00:45:00
C 15 00:30:00
B 5 00:03:00
C 15 00:25:00
I am grouping by the column Type
and I want the sum of Value
and the average of Duration
. I can do the sum of Value
by:
=QUERY(A2:C7; "SELECT A, SUM(B) GROUP BY A")
But when I try to average time using, for example:
=QUERY(A2:C7; "SELECT A, SUM(B), AVG(C) GROUP BY A")
It throws the following error:
Error
It was not possible to analyse the string for the Function QUERY parameter 2:
AVG_SUM_ONLY_NUMERIC