Using analytical function to get partition min and max ?
Hi all,
I have a dataset that is similar to this one :
CODEARTIC E_OF_DATE_DEB_PLA E_OF_DATE_FIN_PLA
------------------------------ ------------------------- -------------------------
T5111092 27/11/2011 00:15:00 27/11/2011 02:47:24
T5111092 27/11/2011 02:47:24 27/11/2011 05:19:48
T5111092 27/11/2011 05:19:48 27/11/2011 07:52:12
T5111092 27/11/2011 07:52:12 27/11/2011 10:24:36
T5111092 27/11/2011 10:24:36 27/11/2011 12:57:00
T5111092 27/11/2011 12:57:00 27/11/2011 15:29:24
T5111092 27/11/2011 15:29:24 27/11/2011 18:01:48
T5111092 27/11/2011 18:01:48 27/11/2011 20:34:12
T5111092 27/11/2011 20:34:12 27/11/2011 23:06:36
T5111092 28/11/2011 00:01:00 28/11/2011 02:33:24
T5121192 28/11/2011 00:15:00 28/11/2011 03:47:24
T5121192 28/11/2011 00:15:00 28/11/2011 03:47:24
T5109001 28/11/2011 00:15:00 28/11/2011 04:17:24
T5109005 28/11/2011 00:15:00 28/11/2011 05:17:24
T5111092 28/11/2011 02:33:24 28/11/2011 05:05:48
T5121192 28/11/2011 03:47:24 28/11/2011 07:19:48
T5121192 28/11/2011 03:47:24 28/11/2011 07:19:48
T5109001 28/11/2011 04:17:24 28/11/2011 08:19:48
T5109005 28/11/2011 05:17:24 28/11/2011 10:19:48
T5121192 28/11/2011 07:19:48 28/11/2011 10:52:12
T5121192 28/11/2011 07:19:48 28/11/2011 10:52:12
And I'd like to get this :
CODEARTIC E_OF_DATE_DEB_PLA E_OF_DATE_FIN_PLA
------------------------------ ------------------------- -------------------------
T5111092 27/11/2011 00:15:00 28/11/2011 02:33:24
T5121192 28/11/2011 00:15:00 28/11/2011 03:47:24
T5109001 28/11/2011 00:15:00 28/11/2011 04:17:24
T5109005 28/11/2011 00:15:00 28/11/2011 05:17:24
T5111092 28/11/2011 02:33:24 28/11/2011 05:05:48
T5121192 28/11/2011 03:47:24 28/11/2011 07:19:48
T5109001 28/11/2011 04:17:24 28/11/2011 08:19:48
T5109005 28/11/2011 05:17:24 28/11/2011 10:19:48
T5121192 28/11/2011 07:19:48 28/11/2011 10:52:12
Put in words, I'd like to get the start date (
E_OF_DATE_DEB_PLA) of the first codeartic and the last end date for this codeartic (
0