Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL query help Nortel symposium 4.2

Status
Not open for further replies.

KVDS

Technical User
Sep 10, 2003
4
DK
Hey

Can some one help reduce this sql query to only take one last logon row each agent, so that i dont get a long data row.


SELECT dAgentPerformanceStat.Timestamp, dAgentPerformanceStat.AgentLogin, dAgentPerformanceStat.AgentSurName, dAgentPerformanceStat.AgentGivenName, dAgentPerformanceStat.ACDCallsAnswered, dAgentPerformanceStat.ACDCallsConfToCDN, dAgentPerformanceStat.ACDCallsConfToDN, dAgentPerformanceStat.ACDCallsConfToIncalls, dAgentPerformanceStat.ACDCallsConfToOther, dAgentPerformanceStat.ACDCallsTalkTime, dAgentPerformanceStat.ACDCallsTransferredToCDN, dAgentPerformanceStat.ACDCallsTransferredToDN, dAgentPerformanceStat.ACDCallsTransferredToIncalls, dAgentPerformanceStat.ACDCallsTransferredToOther, dAgentPerformanceStat.BreakTime, dAgentPerformanceStat.BusyOnDNTime, dAgentPerformanceStat.BusyMiscTime, dAgentPerformanceStat.CallsAnswered, dAgentPerformanceStat.CallsOffered, dAgentPerformanceStat.CallsReturnedToQ, dAgentPerformanceStat.CallsReturnedToQDueToTimeout, dAgentPerformanceStat.CDNCallsConfToCDN, dAgentPerformanceStat.CDNCallsConfToDN, dAgentPerformanceStat.CDNCallsConfToIncalls, dAgentPerformanceStat.CDNCallsConfToOther, dAgentPerformanceStat.CDNCallsTransferredToCDN, dAgentPerformanceStat.CDNCallsTransferredToDN, dAgentPerformanceStat.CDNCallsTransferredToIncalls, dAgentPerformanceStat.CDNCallsTransferredToOther, dAgentPerformanceStat.ConsultationTime, dAgentPerformanceStat.DNCallsConfToACDDN, dAgentPerformanceStat.DNCallsConfToCDN, dAgentPerformanceStat.DNCallsConfToDN, dAgentPerformanceStat.DNCallsConfToOther, dAgentPerformanceStat.DNCallsTransferredToACDDN, dAgentPerformanceStat.DNCallsTransferredToCDN, dAgentPerformanceStat.DNCallsTransferredToDN, dAgentPerformanceStat.DNCallsTransferredToOther, dAgentPerformanceStat.DNInExtCalls, dAgentPerformanceStat.DNInExtCallsTalkTime, dAgentPerformanceStat.DNInIntCalls, dAgentPerformanceStat.DNInIntCallsTalkTime, dAgentPerformanceStat.DNOutExtCalls, dAgentPerformanceStat.DNOutExtCallsTalkTime, dAgentPerformanceStat.DNOutIntCalls, dAgentPerformanceStat.DNOutIntCallsTalkTime, dAgentPerformanceStat.HoldTime, dAgentPerformanceStat.LoggedInTime, dAgentPerformanceStat.NACDCallsAnswered, dAgentPerformanceStat.NACDCallsTalkTime, dAgentPerformanceStat.NetworkCallsAnswered, dAgentPerformanceStat.NetworkCallsTalkTime, dAgentPerformanceStat.NotReadyTime, dAgentPerformanceStat.ReservedForCall, dAgentPerformanceStat.ReservedTime, dAgentPerformanceStat.RingTime, dAgentPerformanceStat.ShortCallsAnswered, dAgentPerformanceStat.TalkTime, dAgentPerformanceStat.WaitingTime, dAgentPerformanceStat.WalkawayTime, dAgentPerformanceStat.UserID, dAgentPerformanceStat.SupervisorUserID, dAgentPerformanceStat.DNInExtCallsHoldTime, dAgentPerformanceStat.DNInIntCallsHoldTime, dAgentPerformanceStat.DNOutExtCallsHoldTime, dAgentPerformanceStat.DNOutIntCallsHoldTime
FROM blue.dbo.dAgentPerformanceStat dAgentPerformanceStat
ORDER BY dAgentPerformanceStat.Timestamp DESC




Best Regards

KVS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top