Clean up SQL call a bit
Sanitize raw query