>>Maybe a 'tiebreaker' field in the order by? The SQL is doing as it should, it doesn't want to arbitrarily choose one name over another...
>
>As I said to Paul, I still don't think it is correct. Just image if I have 65 persons with the same number of messages at rank 49, it will end with 114 persons in the list of top 50. There should be flag to set on or off.
>
>What do you mean by a tiebreaker?
Some other field to break ties. You could order by messages and name, that way you'll get exactly 50 records unless names are identical. Or you could use a date, something less arbitrary. Anything that makes sense so that you can have the SQL order the tied records so that they aren't tied any more. I do that in my ranking queries to get an exact number.
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.