我希望得到多个时间段的列的最大值,其中我知道每个时间段的开始日期和结束日期
我的数据就是这样的
+--------+---------+-------------------+------------------+
| Values | Period | Start Date Period | End Date Period |
+--------+---------+-------------------+------------------+
| 1 | Period1 | 6/17/2020 |7/17/2020 |
| 2 | Period1 | 6/17/2020 |7/17/2020 |
| 3 | Period1 | 6/17/2020 |7/17/2020 |
| 1 | Period2 | 7/18/2020 |8/20/2020 |
| 5 | Period2 | 7/18/2020 |8/20/2020 |
| 4 | Period3 | 8/22/2020 |9/20/2020 |
+--------+---------+--------------------+-----------------+
我需要从中得到的是这样的。。
+--------+---------+-------------------+------------------+
| Values | Period | Start Date Period | End Date Period |
+--------+---------+-------------------+------------------+
| 3 | Period1 | 6/17/2020 |7/17/2020 |
| 5 | Period2 | 7/18/2020 |8/20/2020 |
| 4 | Period3 | 8/22/2020 |9/20/2020 |
+--------+---------+--------------------+-----------------+
1条答案
按热度按时间izkcnapc1#
这似乎是聚合: