how do i group and calculate the average time between two columns in mysql?

To get the avg difference in seconds you can do

SELECT owner, 
       avg(TIMESTAMPDIFF(second, created_on, last_modified))
FROM tasks 
GROUP BY owner

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top