Hvis du inkluderer andre kolonner, skal du også inkludere en GROUP BY-sætning
SELECT AnotherColumn, SUM(DATEDIFF(day, StartDate, EndDate)+1) AS myTotal
FROM myTable
WHERE (Reason = '77000005471247')
GROUP BY AnotherColumn
Hvis du inkluderer andre kolonner, skal du også inkludere en GROUP BY-sætning
SELECT AnotherColumn, SUM(DATEDIFF(day, StartDate, EndDate)+1) AS myTotal
FROM myTable
WHERE (Reason = '77000005471247')
GROUP BY AnotherColumn