Hi,I'm writing a query to get the number of seconds our Indesign-to-PDF generator software uses for each of our clients. The query runs fine but I want to apply a SUM() to the number of seconds and GROUP BY customers to find out how much time each customers uses. I've tried to apply the appropriate functions but with no luck.The query result now looks like this:customer runtime------------------ABC 100ABC 150DEF 300DEF 500SELECT LEFT(RQ.Documents, 3) AS customer, DATEDIFF(second, ( SELECT EventTS FROM RequestEvents WHERE EventName = 'STARTED' AND RequestId = RE.RequestId) , EventTS) AS runtimeFROM RequestEvents REINNER JOIN RequestQueue RQ ON RQ.RequestId = RE.RequestIdWHERE EventName = 'COMPLETED'AND EventInfo = 'Successful processing!!'ORDER BY runtime DESC
I hope this is enough to understand the problem, if not, I can post DDL's too.Thanks in advance!Daniel