خرید بک لینک

I have a table in mysql with the following data:

| StartDateTime       | FinishDateTime |
| 2016-08-18 10:00:00 | 2016-08-18 11:00:00 |
| 2016-08-18 12:00:00 | 2016-08-18 14:00:00 |
| 2016-08-31 17:00:00 | 2016-09-01 09:00:00 |

What I would like to get as the output is

| Month               | Duration       |
| Aug                 | 10             |
| Sept                | 9              |

I can get the right output when each record is only within 1 month but I am not sure how to go about crossing month boundaries. Can anyone point me in the right direction?

برچسب: hours in a year,hours in a week,hours in a month,hours in a work year,hours in a day,hours in a work week,hours in a day on mars,hours in a month average,hours in a work month,hours in a school year, نویسنده: رضا رضوی تاريخ: دوشنبه 15 شهريور 1395 ساعت: 11:27

صفحه بندی