"Mitch Vincent" <mitch@venux.net> writes:
> Ok, see applicant J? I need him to be above C.
Your example was about as transparent as mud, but maybe you are looking
to sort on MAX(resubmitted, created) or something like that? Anyway
I'd think that sorting on some function of the two dates is probably
what you need to do.
I don't think we have a two-input MAX function like that, but it'd be
easy enough to fake it with a CASE expression. Something like
... ORDER BY (CASE WHEN a > b THEN a ELSE b END) DESC;
regards, tom lane