Revert "Revert "SQL""

This reverts commit fce9e1f246487b6567a7ad6a9a16c41c65197207.