我正在尝试找出如何通过唯一ID(每个ID仅包含一个ID)SUM
的时间。这是一些数据的标记。我需要GROUP BY
f_name
,l_name
和area
。我还需要组计数(唯一编号的id)和组参与者(仅简单编号的id):
+----+------+-------+-------+------+--+ | ID | Time | fname | lname | Area | | +----+------+-------+-------+------+--+ | 1 | 3:30 | Jeff | Chose | LA | | | 1 | 3:30 | Jeff | Chose | LA | | | 1 | 3:30 | Jeff | Chose | LA | | | 2 | 4:00 | Jeff | Chose | LA | | +----+------+-------+-------+------+--+
数据应如下所示:
+------+-------+-------+------+-------------+--------------------+ | Time | fname | lnam | Area | Group Count | Group Participants | +------+-------+-------+------+-------------+--------------------+ | 7:30 | Jeff | Chose | LA | 2 | 4 | | | | | | | | +------+-------+-------+------+-------------+--------------------+
奖金:如果您可以将3:30
转换为3.5