"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I think you can just do this and get the desired result, if I'm reading the code correctly:

Select datediff(hour, 0, cast(CallTime as time)),
CAST(DATEADD(SECOND, SUM(Duration), 0) AS time) AS time
from NT_API_CallLogs
WHERE Duration <> 0
AND cast(CallTime as date) = '2017-3-08'
GROUP BY datediff(hour, 0, cast(CallTime as time) )
ORDER BY datediff(hour, 0, cast(CallTime as time) )

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Managed service contracts are great - when they're making you money. Yes, you’re getting paid monthly, but is it actually profitable? Learn to calculate your hourly overhead burden so you can master your IT services pricing strategy.