Revert "Revert "back sql""

This reverts commit d6d3479fd44b5beba0a382721de5b19112885b9e.