答案 0 :(得分:1)
你可以试试这个:
SELECT regNr, CONCAT('total duration - ', SUM(duration)) AS output FROM table_name
GROUP BY regNr
将输出:
regNr output
======================================
ABC123 total duration - 180
DEF456 total duration - 130