unit tests for rank
is not passing with sqlite