Quantcast
Channel: mysql - sum interval dates - Database Administrators Stack Exchange
Browsing latest articles
Browse All 3 View Live

Answer by Lennart - Slava Ukraini for mysql - sum interval dates

You could merge overlapping intervals and count the hours from there (untested):select name, min(start), end from ( select x.name, x.start, min(y.end) as end from t as x join t as y on x.name = y.name...

View Article



Answer by Mark for mysql - sum interval dates

Consider generating a table of hours as timestamps:HOUR----2014-10-22 12:002014-10-22 13:002014-10-22 14:002014-10-22 15:00...Then you can select the hours that are between the periods of your original...

View Article

mysql - sum interval dates

I would like to sum the hours for each name, giving a total interval between START and END activities. It would be simple if I could subtract from each record the end of the beginning. For example,...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>