Wrong column name in where syntax repaired