corrected sql statement