rose bush: list: fix SQL syntax and page offset

Fix SQL syntax for cycles and tasks queries.
Fix SQL offset. Count from 0.