Updated SQL statement