Fixed typo in SQL query