I have a table as below
start_date end_date category
26/05/2015 10:05 26/05/2015 10:10 d
26/05/2015 10:17 26/05/2015 10:20 d
26/05/2015 10:35 26/05/2015 10:44 c
26/05/2015 10:50 26/05/2015 10:57 c
26/05/2015 11:05 26/05/2015 11:13 d
26/05/2015 11:27 26/05/2015 11:30 d
and i need to group by category and take min(start_date) and max(end_date) but if there no sequence of category it has different meaning.
i would like to get result like this
start_date end_date category
26/05/2015 10:05 26/05/2015 10:20 d
26/05/2015 10:35 26/05/2015 10:57 c
26/05/2015 11:05 26/05/2015 11:30 d
thanks everyone