fixed sql statement to be consistent with rest of file