I have a large data (sorted by recent date) set like this : ID NAME BEGIN END TOP 191080 John 25/04/2016 01/05/2016 NO 191080 John 08/06/2016 10/06/2016 NO 191080 John 21/06/2016 24/06/2016 Yes 191080 John 21/07/2016 24/09/2016 Yes 191141 Alex 16/01/2017 17/01/2017 NO 191141 Alex 22/02/2017 29/04/2017 NO If "Yes" and "NO" occurs in TOP for an observation, then the most recent dates is choosen But if only "NO" occurs in TOP for an observation, then the minimum of BEGIN and maximum of END are choosen I mean how get this : ID NAME BEGIN END 191080 John 21/07/2016 24/09/2016 191141 Alex 16/01/2017 29/04/2017
... View more