Improve SQL statement factory docs (closes #547)