SQL: SUM Information but retain ResourceID (EmployeeNum)

In the attached sample you will see sample telephony data from Cisco UCCX Express from the agentconnectiondetail table.

This is the query I am running:
FROM agentconnectiondetail
WHERE startdatetime >= TO_DATE('01-01-2015 05:00','%m-%d-%Y %H:%M') AND sessionseqnum = 0

My question is how can I make the information unique to the SessionID which is the unique identifier for the call but retain the employeenumber of the agent who answered the call?

For example I highlighted in the document on the sample tab the sessionID 43000086306. The data shows that for sessionID 43000086306 the call came in and rang at two agent positions before it was picked up by the third. You see this because the resourceID changes and 10 seconds of ringtime is logged for those positions but the phone was not picked up since the talktime is 0. How can I sum the ringtimes together and retain the resourceID number for the agent who picked up the call.
Ryan SimmonsBusiness Analyst IIIAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"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.

Mark BullockQA EngineerCommented:
Perhaps this would work.
SELECT acd.*
, (select sum(acd2.ringtime) from agentconnectiondetail acd2 where acd2.sessionid=acd.sessionid) as total_ringtime
FROM agentconnectiondetail acd
WHERE startdatetime >= TO_DATE('01-01-2015 05:00','%m-%d-%Y %H:%M') AND sessionseqnum = 0
AND talktime>0

Open in new window

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.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.