I am trying to find out for each order which was the last date that particular order had. Also there is more than one order and each have multiple orders against them.
[TABLE="width: 228"]
<tbody>[TR]
[TD]ID
[/TD]
[TD]Sched.StartDate
[/TD]
[TD]Order
[/TD]
[/TR]
[TR]
[TD]5206
[/TD]
[TD]05/01/2010
[/TD]
[TD]11175203
[/TD]
[/TR]
[TR]
[TD]5206
[/TD]
[TD]03/01/2012
[/TD]
[TD]13627997
[/TD]
[/TR]
[TR]
[TD]5206
[/TD]
[TD]31/12/2013
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5206
[/TD]
[TD]04/12/2013
[/TD]
[TD]16244494
[/TD]
[/TR]
[TR]
[TD]5206
[/TD]
[TD]12/11/2015
[/TD]
[TD]18618596
[/TD]
[/TR]
[TR]
[TD]5206
[/TD]
[TD]29/11/2017
[/TD]
[TD]20971039
[/TD]
[/TR]
[TR]
[TD]5206
[/TD]
[TD]27/11/2019
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5224
[/TD]
[TD]25/05/2012
[/TD]
[TD]14132431
[/TD]
[/TR]
[TR]
[TD]5224
[/TD]
[TD]04/05/2014
[/TD]
[TD]16759577
[/TD]
[/TR]
[TR]
[TD]5224
[/TD]
[TD]28/04/2016
[/TD]
[TD]19102395
[/TD]
[/TR]
[TR]
[TD]5224
[/TD]
[TD]04/05/2018
[/TD]
[TD]21498020
[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 228"]
<tbody>[TR]
[TD]ID
[/TD]
[TD]Sched.StartDate
[/TD]
[TD]Order
[/TD]
[/TR]
[TR]
[TD]5206
[/TD]
[TD]05/01/2010
[/TD]
[TD]11175203
[/TD]
[/TR]
[TR]
[TD]5206
[/TD]
[TD]03/01/2012
[/TD]
[TD]13627997
[/TD]
[/TR]
[TR]
[TD]5206
[/TD]
[TD]31/12/2013
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5206
[/TD]
[TD]04/12/2013
[/TD]
[TD]16244494
[/TD]
[/TR]
[TR]
[TD]5206
[/TD]
[TD]12/11/2015
[/TD]
[TD]18618596
[/TD]
[/TR]
[TR]
[TD]5206
[/TD]
[TD]29/11/2017
[/TD]
[TD]20971039
[/TD]
[/TR]
[TR]
[TD]5206
[/TD]
[TD]27/11/2019
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5224
[/TD]
[TD]25/05/2012
[/TD]
[TD]14132431
[/TD]
[/TR]
[TR]
[TD]5224
[/TD]
[TD]04/05/2014
[/TD]
[TD]16759577
[/TD]
[/TR]
[TR]
[TD]5224
[/TD]
[TD]28/04/2016
[/TD]
[TD]19102395
[/TD]
[/TR]
[TR]
[TD]5224
[/TD]
[TD]04/05/2018
[/TD]
[TD]21498020
[/TD]
[/TR]
</tbody>[/TABLE]