class QueryController {

    int skipToLast(int cursorLength, int limit)
    {
        if (cursorLength > limit)
        {
            return cursorLength - limit;
        }
        return 0;
    }

}