pulling out SQL templates into constants for test support; single-thread unit tests passing