its strange, that looks like my code, i have never seen this problem before, and i have run plenty of similar queries, like i said, it works for BuiltWeek, but not ShippedWeek which would seem to indicate a problem in the data, but when i sort the data by hand in the table, it comes out correct...