i'm sorry - i'm not super smart with this, but i'm not sure i understand. i can sort the records fine by the visitdate, but i need a column that would actually number them so that i can eventually subtract the max visit number to the max-1 visit number.
So, my query might look like this:
ptid...