Adding missing closing ')' in SQL query.