You weren't, clarification
He wanted it sorted by whether any tickets were open. You weren't sorting by that, you were sorting by ordernum. Hence the title of my post.
I suggested that you could fix that to get something closer to what he wanted by sorting on count(*), but it doesn't support exactly the sort that I think he would eventually decide that he wants.
Cheers,
Ben
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)