Included SQL stub for using RANK, and refactored methods accordingly