select FileName,
sum(datediff(mi,StartTimeLocal,EndTimeLocal))
from dbo.vSMS_G_System_SoftwareUsageData
group by FileName
order by FileName