sql statement corrected.