Created
November 19, 2010 20:34
-
-
Save noahhendrix/707120 to your computer and use it in GitHub Desktop.
sum of difference of two datetime columns
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SEC_TO_TIME(SUM(TIME_TO_SEC(TIMEDIFF(s.ended_at, s.started_at)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this really the best way?