I'm trying to create a query to sum time grouped by user and the result should be in minutes.
contents of table:
duration user
00:06:00 user1
00:06:00 user2
00:04:00 user3
00:01:00 user55
00:02:00 user1
00:01:00 user2
00:01:00 user55
duration user
8 user1
7 user2
4 user3
2 user55
SELECT user, SEC_TO_TIME( SUM( TIME_TO_SEC(
) ) ) AS totaltime from salientes group by user
mysql> SELECT MINUTE(SEC_TO_TIME(SUM(TIME_TO_SEC( duration))))
as tt ,user from tt group by user;
+------+--------+
| tt | user |
+------+--------+
| 8 | user1 |
| 7 | user2 |
| 4 | user3 |
| 2 | user55 |
+------+--------+
4 rows in set (0.00 sec)