Updated SQL

Fixed