MySQL Forums
Forum List  »  General

Re: Aggregate records by time
Posted by: Rick James
Date: January 31, 2014 05:12PM

I don't think you need to reference the table 4 times -- perhaps only twice; maybe only once. Take that on as a challenge.

If `time` is of datatype TIME, then there is TO_SECONDS() with which you can do arithmetic.

Even in this this case, I think it would be better to have `date` and `time` combined into a single DATETIME or TIMESTAMP field.

Options: ReplyQuote


Subject
Written By
Posted
January 30, 2014 05:05AM
Re: Aggregate records by time
January 31, 2014 05:12PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.