fixing typo and documentation

fixed a typo in SQL script and updated documentation.