Corrected an error in an SQL query.