答案1
首先对它们进行分组,然后让最小值/最大值提取正确的时间,例如:
SELECT id, name, status, priority, min(start) as start, max(end) as end, end-start as 'time difference'
FROM issues
GROUP BY id,status, priority
首先对它们进行分组,然后让最小值/最大值提取正确的时间,例如:
SELECT id, name, status, priority, min(start) as start, max(end) as end, end-start as 'time difference'
FROM issues
GROUP BY id,status, priority