Move SQL to single line to avoid messy logging

@tucker250