fix typo in sql query