Gasman
Enthusiastic Amateur
- Local time
- Today, 08:34
- Joined
- Sep 21, 2011
- Messages
- 17,165
Hi everyone,
Looking to see if I can summarise call logs reasonably easy in Access (for me at least).
I need to be able to sum all the individual call duration values and output as hh:mm:ss
So far I have as below and am happy to write a function if need be but feel sure this would have been done before without a custom function?
Duration for each record is in seconds.
TIA
Looking to see if I can summarise call logs reasonably easy in Access (for me at least).
I need to be able to sum all the individual call duration values and output as hh:mm:ss
So far I have as below and am happy to write a function if need be but feel sure this would have been done before without a custom function?
Duration for each record is in seconds.
TIA
Code:
SELECT Caller.CallerName, Format([Time],"dd/mm/yyyy") AS CallDate, Count(Format([Time],"dd/mm/yyyy")) AS Calls, Sum(BT.[Duration (s)]) AS [SumOfDuration (s)], Min(Format([Time],"hh:nn:ss")) AS FirstCall, Max(Format([Time],"hh:nn:ss")) AS LastCall
FROM Caller INNER JOIN BT ON Caller.CallerNumber = BT.[Business Number]
GROUP BY Caller.CallerName, Format([Time],"dd/mm/yyyy");