我有如下数据
A | B | C | D | E | F
217731 | 24856 | 01/01/2006 | 03/31/2007 | 0569 | 972450
217731 | 24856 | 04/01/2007 | 09/30/2008 | 0569 | 972450
217731 | 24856 | 10/01/2008 | 12/31/2008 | 0569 | 972450
217731 | 24856 | 01/01/2009 | 12/31/2009 | 0569 | 972450
217731 | 24856 | 01/01/2010 | 09/30/2011 | 0569 | 318704
217731 | 24856 | 10/01/2011 | 03/04/2012 | 0569 | 318704
217731 | 24856 | 03/05/2012 | 09/30/2012 | 0569 | 972450
217731 | 24856 | 10/01/2012 | 07/31/2013 | 0569 | 972450
我需要输出为
A | B | C | D | F
217731 | 24856 | 01/01/2006 | 31/12/2009 | 972450
217731 | 24856 | 01/01/2010 | 04/03/2012 | 318704
217731 | 24856 | 05/03/2012 | 31/07/2013 | 972450
当我使用 group by 子句时,我得到如下输出
A | B | C | D | F
217731 | 24856 | 01/01/2006 | 07/31/2013 | 972450
217731 | 24856 | 01/01/2010 | 03/04/2012 | 318704