two style feedback items:
- I'd ditch all the parens but totally personal pref
- I personally like the following syntax for this type of thing

    var sqlOffset = req.query.offset || 0

But again, personal pref