add sql, sort order and offset to getList