Agrupe-os primeiro e deixe que min / max extraia a hora certa como:
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
Agrupe-os primeiro e deixe que min / max extraia a hora certa como:
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