fix typo in SQL statements