repaired SQL-statement