fixed sql. Added temps to status