Thank you Franco,
What you wrote is pretty useful but I describe my problem in detail. I have a table with two TIMESTAMP columns. I need to make a query to get the MAXIMUM difference IN TIME between the two. That means I should get a result something like 2 days 1 hour 27 min 12 sec.
I checked manually and the biggest difference in the table between the two columns is 1 min 5 sec, which is equal with 65 sec.
But my query (SELECT MAX(column1-column2) AS max_diff FROM table) returns 145, which is absolutely nonsense. Do you know what I mean? If I get the number 65 back, there is no problem, I can get the real difference in time between the two. But now I get either 1 min 45 sec, or something similar.
Or if you can give me an idea how to combine this query with DATE() or other functions, I'd be grateful.
I can't believe that this is a unique problem in the world! Some of you must have solved it earlier.
I hope that you can help me. Thanks again. I appreciate it.
Thanks, Akos