Revert "Split the large SQL to smaller bits."

This reverts commit 022e7f3148b1c00107bb36786a3e29dac6c5177c.