Fix misplaced SQL statement
Merge pull request #697 from pgiraud/doc_fix

Fix misplaced SQL statement