我一直试图找出这个查询的时间最长,但却无法得到它。这是我想要做的:
我想拍这个数据
+------------+------------+-------+
| StartDate | EndDate | Value |
+------------+------------+-------+
| 2015-01-01 | 2015-01-31 | 10 |
| 2015-01-12 | 2015-01-15 | 9 |
| 2015-01-18 | 2015-01-19 | 8 |
+------------+------------+-------+
把它变成这个:
+------------+------------+-------+
| StartDate | EndDate | Value |
+------------+------------+-------+
| 2015-01-01 | 2015-01-14 | 10 |
| 2015-01-12 | 2015-01-15 | 9 |
| 2015-01-16 | 2015-01-17 | 10 |
| 2015-01-18 | 2015-01-19 | 8 |
| 2015-01-20 | 2015-01-31 | 10 |
+------------+------------+-------+
关于我如何解决这个问题的任何想法?
提前谢谢!