SQL Query: how to retrieve time between articles

Moderator: crythias

Locked
pekkaar
Znuny newbie
Posts: 41
Joined: 11 May 2010, 16:18
Znuny Version: 3.1.10
Location: Hungary

SQL Query: how to retrieve time between articles

Post by pekkaar »

Hi All,

I know this is a fairly common SQL query problem: I want to retrieve time differences between records (i.e. between otrs.article.create_time fields for the same ticket). I want to do this to be able to measure how fast our agents react to customer followups.

Unfortunately I am more into MS SQL, don't really know the common tricks in MySQL (I inherited this project so had no say in what DBMS to install in the first place). Anyhow, in MS SQL I would do this by using Cursors and Table variables, but I am not sure there are table vars in MySQL?

Since this feels to be a very common requirement (after all you want to analyze a ticketing system form every possible angle), I hope somebody already solved this?

Any help is greatly appreciated!

Thanks,
Peter
otrs 4.0.3, mysql 5.5.15, Fedora r15
Locked